cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

## Measures in drill down working for each row but not summing row values in total

Hi,

I have a measure that works out the maximum percentage (percentage of sales) for the day between all stores. It then looks at the current stores percentage and compares it to the maximum percentage and indicates the shortfall (maximum for the day - current store percentage) = shortfall for store.. We then use this shortfall times the number of items to get a value.

When the table is at bottom drilldown (by day) then each row shows the macimum for the day and the shortfall for each store. When however we drill up to the month (or show totals) it seems to take the maximum for all days in the month and do the sum, instead of adding the values from each row to give you an overall value for the month.

We did use a calculated column before and it added each row correctly but with this formula we have to work out a measure (because of filtering, roles etc.).

Does anyone have any recomendations?

1 ACCEPTED SOLUTION
Microsoft Employee

Hi @duggy ,

To ensure the measure working at both parent-level and child-level in Matrix, we need to calculate the measure accordingly depending on the what level the current filter context is at. We can use the DAX ISINSCOPE function to evaluate current level. Please refer to below links to get the DAX logic.

DAX – Ranking with Hierarchy Drill-Down Problem

Clever hierarchy handing in DAX

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Microsoft Employee

Hi @duggy ,

To ensure the measure working at both parent-level and child-level in Matrix, we need to calculate the measure accordingly depending on the what level the current filter context is at. We can use the DAX ISINSCOPE function to evaluate current level. Please refer to below links to get the DAX logic.

DAX – Ranking with Hierarchy Drill-Down Problem

Clever hierarchy handing in DAX

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.