Data Populating charts but gets Data Not Found in drill through

I have a report (definition below) that is powered by advanced settings to calculate and aggregate time spent in statues as our company wishes to measure. The report is populating fine but when I drill through to analyze the data I get a Data Not Found message. How is the report populating without data?

{
“cube_name”: “Issues”,
“cube_reports”: [ {
“name”: “PWC - Lead Time”,
“folder_name”: “DORA”,
“result_view”: “line_chart”,
“definition”: {“columns”:{“dimensions”:[{“name”:“Measures”,“selected_set”:["[Measures].[Mean LeadTime (WrkDays)]"],“members”:null}]},“rows”:{“dimensions”:[{“name”:“Time”,“selected_set”:["[Time.Weekly].[Week].Members"],“members”:null,“bookmarked_members”:null}],“filter_by”:{“conditions”:[{“expression”:"[Time.Weekly].CurrentHierarchyMember",“operator”:“between”,“value”:“9 weeks ago and today”,“value_type”:“date”}]},“nonempty_crossjoin”:false},“pages”:{“dimensions”:[{“name”:“Issue Type”,“selected_set”:["[Issue Type].[All Issue Types]"],“members”:[{“depth”:0,“name”:“All Issue Types”,“full_name”:"[Issue Type].[All Issue Types]",“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:false},{“depth”:1,“name”:“Story”,“full_name”:"[Issue Type].[Story]",“parent_full_name”:"[Issue Type].[All Issue Types]"},{“depth”:1,“name”:“Bug”,“full_name”:"[Issue Type].[Bug]",“parent_full_name”:"[Issue Type].[All Issue Types]"}],“bookmarked_members”:null,“current_page_members”:["[Issue Type].[Story]","[Issue Type].[Bug]"]},{“name”:“Project”,“selected_set”:["[Project].[All Projects]"],“members”:[{“depth”:0,“name”:“All Projects”,“full_name”:"[Project].[All Projects]",“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:false},{“depth”:1,“name”:“ClinicalPath”,“full_name”:"[Project].[ClinicalPath]",“drillable”:true,“key”:“PWC”,“parent_full_name”:"[Project].[All Projects]"}],“bookmarked_members”:null,“current_page_members”:["[Project].[ClinicalPath]"]}]},“options”:{},“view”:{“current”:“line_chart”,“maximized”:false,“line_chart”:{“area”:false,“swap_axes”:false,“data_labels”:true,“series_options”:{“Issues created”:{“type”:“column”,“color”:"#DC7369/custom/"},“Issues resolved”:{“type”:“area”,“color”:"#AAC458/custom/"},“Average resolution days”:{“separateAxis”:2,“color”:"#6795C4/custom/",“type”:“line”},“Open issues”:{“color”:"#5E6C84",“dataLabelType”:“top rotated”,“type”:“area”},“Avg LeadTime (9 periods)”:{“dataLabelType”:false},“Rolling Avg Lead Time 9 periods”:{}}},“table”:{}},“calculated_members”:null}
} ],
“calculated_members”: [{“name”:“Mean LeadTime (WrkDays)”,“dimension”:“Measures”,“formula”:“CASE WHEN [Issue].CurrentMember.Level.Name \u003c\u003e ‘Issue’ \nTHEN\n --calcualtion for “Mean Lead Time (EdTech)- 9 periods”\n Aggregate(\n LastPeriods(9, [Time].CurrentHierarchyMember),\n [Measures].[Lead Time Workdays-HM closed])\n /\n Aggregate(\n LastPeriods(9, [Time].CurrentHierarchyMember),\n [Measures].[Issues with Lead Time Workdays-HM closed])\nELSE\n – optimized formula for drill through Issue\n NonZero(IIF(\n (DateBetween(\n [Issue].CurrentMember.get(‘Closed at’),\n [Time].CurrentHierarchyMember.Lag(8).StartDate,\n [Time].CurrentHierarchyMember.NextStartDate)\n AND NOT IsEmpty([Measures].[Issue Lead Time Workdays-HM closed]) ),\n ([Time].CurrentHierarchy.DefaultMember,\n [Measures].[Lead Time Workdays-HM closed]),\n 0\n ))\nEND”,“format_string”:""}]
}

Hi @jtalarico!

​Thank you for the report definition, it is helpful to be on the same page while finding out why your report works in such a way!

I see in the formula that you have an optimized function for when the Issue level is used. This is the part of the CASE that is also called when Drill through the Issue is done. In this ELSE condition, though, you have added an issue property check, which I believe does not exist but is called in the formula (see my comment below).

Please try to modify the formula as follows and let me know if that helps!

CASE WHEN [Issue].CurrentMember.Level.Name <> 'Issue' 
THEN
 --calcualtion for Mean Lead Time (EdTech)- 9 periods
 Aggregate(
 LastPeriods(9, [Time].CurrentHierarchyMember),
  [Measures].[Lead Time Workdays-HM closed])
 /
 Aggregate(
 LastPeriods(9, [Time].CurrentHierarchyMember),
  [Measures].[Issues with Lead Time Workdays-HM closed])
ELSE
 -- optimized formula for drill through Issue
 NonZero(IIF(
 DateBetween(
   [Issue].CurrentMember.get('Closed at'),
   [Time].CurrentHierarchyMember.Lag(8).StartDate,
   [Time].CurrentHierarchyMember.NextStartDate),
  AND NOT IsEmpty([Measures].[Issue Lead Time Workdays-HM]) ), -- The name used here was "Issue Lead Time Workdays-HM closed" which, looking at naming convention, I believe does not exist among Measures.
 ([Time].CurrentHierarchy.DefaultMember,
  [Measures].[Lead Time Workdays-HM closed]),
 0
 ))
END

Lauma / support@eazybi.com