This is the code I'm using for calculating the median
Median( Filter( NonEmptyCrossJoin( Descendants([Issue].CurrentMember, [Issue].[Issue]), [Measures].DefaultMember), [Measures].[Issues resolved] > 0 ), DateDiffHours([Issue].get('Created at'), [Issue].get('Resolved at')) )
I'm looking to use a custom date field I have instead of the "Resolved" field. However, 2 issues with that:
The formula above is looking only at resolved issues (the filter with [Measures].[Issues resolved] > 0), but I imagine you would like to go through all issues no matter if they are resolved or not. In this case you would use the [Measures].[Issues created] > 0 instead.
If the custom field is Date Picker type (instead of Date Time Picker), and you have selected to import this field as Property, the time for Date Picker issue property will be set to that days 00:00:00 in eazyBI. You can still use this in the DateDiffHours function, but note that the hours difference will be calculated with beginning of day. Maybe instead it is better to use the DateDiffDays function that would ignore the time?
To use another Issue property instead of 'Resolved at' you can write this custom fields name in the to_date argument of function. For example, if the custom date field name in JIRA is 'Date for testing' the formula would be as follows
Median( Filter( NonEmptyCrossJoin( Descendants([Issue].CurrentMember, [Issue].[Issue]), [Measures].DefaultMember), [Measures].[Issues created] > 0 ), DateDiffDays([Issue].get('Created at'), [Issue].get('Date for testing')) )
Please let me know if you have any additional questions. Note that you can contact me directly at email@example.com
Hey Lauma, thanks for the answer. I tried this change but it didn't get any results back. Just inserted the field name into [Issue].get('<field name>')). BTW, the field was change to a date-time custom field. Maybe there is a need to add "at"/"on" right after the field's name?
Hi Peter, To debug this, could you select the Issues dimension on rows and expand some project where issues have the custom date field and then from Measures / Calculated members / Issue properties select the custom date field property on columns - does it show up for issues? You can see exact property name that should be used in the above formula by clicking on edit for the Property calculated Measure. Please send me as screenshot of above report if you still experience problems after finding the Issue property with the custom date. Kind regards, Lauma
Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs