Calculating issues resolved in 1 day or less

I am trying to determine how many of our issues are resolved in 1 day or less. I’m getting results but I dont think its accurate and using this script and my user defined calculation, I can change the days and nothing in the results change

{
“cube_name”: “Issues”,
“cube_reports”: [ {
“name”: “Softchoice - resolved in 1 day”,
“folder_name”: “Softchoice ServiceDesk”,
“result_view”: “table”,
“definition”: {“columns”:{“dimensions”:[{“name”:“Measures”,“selected_set”:["[Measures].[Total Issues]","[Measures].[1 day or less]"],“members”:[]}]},“rows”:{“dimensions”:[{“name”:“Time”,“selected_set”:["[Time].[Month].Members"],“members”:[],“bookmarked_members”:[{“depth”:3,“name”:“Nov 2019”,“full_name”:"[Time].[2019].[Q4 2019].[Nov 2019]",“drillable”:true}]}]},“pages”:{“dimensions”:[{“name”:“Issue Type”,“selected_set”:["[Issue Type].[Issue Type].Members"],“members”:[{“depth”:1,“name”:“Incident”,“full_name”:"[Issue Type].[Incident]"}],“bookmarked_members”:[],“current_page_members”:["[Issue Type].[Incident]"]},{“name”:“Project”,“selected_set”:["[Project].[SDS]"],“members”:[{“depth”:0,“name”:“SDS”,“full_name”:"[Project].[SDS]",“drillable”:true,“type”:“all”}],“bookmarked_members”:[],“current_page_members”:["[Project].[SDS]"]}]},“options”:{“nonempty”:true},“view”:{“current”:“table”,“maximized”:false,“table”:{“freeze_header”:false}}}
} ],
“calculated_members”: [{“dimension”:“Measures”,“name”:“Issue created date”,“format_string”:“mmm dd yyyy”,“formula”:"[Issue].CurrentHierarchyMember.get(‘Created at’)",“annotations”:{“group”:“Issue properties”,“predefined”:true}},{“dimension”:“Measures”,“name”:“Issue resolution date”,“format_string”:“mmm dd yyyy”,“formula”:"[Issue].CurrentHierarchyMember.get(‘Resolved at’)",“annotations”:{“group”:“Issue properties”,“predefined”:true}},{“dimension”:“Measures”,“name”:“Issue closed date”,“format_string”:“mmm dd yyyy”,“formula”:"[Issue].CurrentHierarchyMember.get(‘Closed at’)",“annotations”:{“group”:“Issue properties”,“predefined”:true}},{“name”:“Total Issues”,“dimension”:“Measures”,“formula”:"[Measures].[Issues resolved]",“format_string”:""},{“name”:“1 day or less”,“dimension”:“Measures”,“formula”:“NonZero(Count(\n Filter(\n Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),\n (\n --closed\n (\n [Measures].[Issues resolved] \u003e 0\n --IsEmpty([Measures].[Issue closed date])\n AND\n DateDiffDays(\n [Measures].[Issue resolution date],\n now()\n ) \u003c= 1\n )\n OR\n --Closed\n (\n [Measures].[Issues closed] \u003e 0\n --NOT IsEmpty([Measures].[Issues closed date])\n AND\n DateDiffDays(\n [Measures].[Issue created date],\n [Measures].[Issue closed date]\n ) \u003c= 1\n )\n )\n )\n))”,“format_string”:""}]
}

Hi @huntley27,

To get a result about how many issues are resolved in less than 1 day, you can import Resolution interval and adjust the intervals to your needs. Please visit our documentation to learn more: https://docs.eazybi.com/eazybijira/analyze-and-visualize/interval-dimensions

I noticed that you are using in your formula measures regarding issue resolution and closed date. Be aware that those measures are with different meanings and in your case doesn’t seem to suit your needs.
By default Jira stores just issue resolution date (resolved issues are counted in Issues resolved measure) but not final issue closing date. But frequently it is important to analyze closed issues (which are in final closed status) and not just resolved issues. For this purpose when starting Jira data import in eazyBI plugin specify Closed statuses field value. By default standard Closed status will be selected but if you have custom workflows with different final closed statuses then specify one or several final closed statuses in this field.
More about closed measures you can read in our documentation https://docs.eazybi.com/eazybijira/data-import/jira-issues-import/issues-closed-measure

Gerda // support@eazybi.com