Forum Discussion
Matrix with dynamic years only for specific measures (hide other measures per year)
- 3 months ago
The matrix in Power BI applies a single column hierarchy to every value field, so natively you cannot have Year break down only some measures and not others inside one matrix.
The cleanest workaround is to place two matrix visuals side by side, sharing the same row fields. One has Year on Columns with only your two year-broken-down measures, the other has no column field and contains the rest of the measures. Align their widths and hide the duplicate row header on the second one for a seamless look.
If everything has to stay in one visual, you can wrap the non-year measures so they return BLANK when Year is in scope and the actual total when it is not, for example:
Total Cost (no year) = IF(ISINSCOPE('Date'[Year]), BLANK(), [Total Cost])The year column headers will still appear but the cells will be empty for those measures. In practice the two-visual approach looks cleaner.
If that was helpful, please give a thumbs up and mark it as resolved.
Best regards,
Shai Karmani
Hi fpereira ,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank Shai_Karmani , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.
Best Regards,
Community Support Team
- v-menakakota3 months ago
Community Support
Hi fpereira ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.
Best Regards,
Community Support Team