Forum Discussion
Keep Measure value when Drilldown in Table Matrix (Do not accumulate subrows)
- 1 year ago
Hi DavidAnthony ,
Thanks for confirming, and as SamWiseOwl showed, ISINSCOPE is a good approach for detecting the hierarchy level. If your current measure isn’t giving the expected result, it may be due to how the filter context is being applied when drilling down in your custom visual.
At the Color level, you’ll need to make sure the calculation ignores the Company filter so it matches the original average you posted. You can do this by adapting the SWITCH pattern to use REMOVEFILTERS or ALL for that level, for example:
SWITCH( TRUE(), ISINSCOPE(Cars[make]), AVERAGE(Cars[value]), ISINSCOPE(Cars[color]), CALCULATE(AVERAGE(Cars[value]), REMOVEFILTERS(Cars[make])), BLANK() )If you can share the dataset or a sample version of your measure, it will be easier to pinpoint why your current code is not aligning with the Matrix visual output.
You could also share .pbix file without any sensitive data. Please follow this guide on how to share .pbix.: How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Hope this helps. Please reach out for further assistance.
Thank you.
Hi DavidAnthony ,
Following up to see if your query is resolved.
If you need further assistance, please reach out with sample .pbix to assist better.
Thank you.