Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a matrix visualizations.
I want to format the row headers on expanding and collapsing.
Use case is that in the matrix visual, Show values as Y if Years are visual,
if Years are extended to Quarters, show Q
else if Quarters are extended to Months show M
Is it possible in matrix visual ? If yes, then how can i implement this?
Thanks in advance!!
Solved! Go to Solution.
Hi @Anonymous
I build a sample like yours to have a test.
Build a matrix visual:
Then build measure to achieve your goal.
Measure use IF function:
Total Sales =
IF (
ISINSCOPE ( 'Table'[Year].[Day]),
SUM('Table'[Sales]),
IF (
ISINSCOPE ( 'Table'[Year].[Month]),
"M",
IF (
ISINSCOPE ( 'Table'[Year].[Quarter] ),
"Q",
IF ( ISINSCOPE ( 'Table'[Year].[Year] ), "Y",SUM('Table'[Sales]))
)
)
)
Or you can use a measure use Switch function:
Total Sales 2 =
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Year].[Day] ), SUM ( 'Table'[Sales] ),
ISINSCOPE ( 'Table'[Year].[Month] ), "M",
ISINSCOPE ( 'Table'[Year].[Quarter] ), "Q",
ISINSCOPE ( 'Table'[Year].[Year] ), "Y",
SUM ( 'Table'[Sales] )
)
Result:
You can download the pbix file from this link: Can we format row header in Matrix Visualisation in Power Bi?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your onedrive business.
Best Regards,
Rico Zhou
Hi @Anonymous
I build a sample like yours to have a test.
Build a matrix visual:
Then build measure to achieve your goal.
Measure use IF function:
Total Sales =
IF (
ISINSCOPE ( 'Table'[Year].[Day]),
SUM('Table'[Sales]),
IF (
ISINSCOPE ( 'Table'[Year].[Month]),
"M",
IF (
ISINSCOPE ( 'Table'[Year].[Quarter] ),
"Q",
IF ( ISINSCOPE ( 'Table'[Year].[Year] ), "Y",SUM('Table'[Sales]))
)
)
)
Or you can use a measure use Switch function:
Total Sales 2 =
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Year].[Day] ), SUM ( 'Table'[Sales] ),
ISINSCOPE ( 'Table'[Year].[Month] ), "M",
ISINSCOPE ( 'Table'[Year].[Quarter] ), "Q",
ISINSCOPE ( 'Table'[Year].[Year] ), "Y",
SUM ( 'Table'[Sales] )
)
Result:
You can download the pbix file from this link: Can we format row header in Matrix Visualisation in Power Bi?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Doubt that. how would it look like? If you can share an example
refer this
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
For Example:-
When I expand 2013 to the next level ie- Quarter then 2013 would be converted into text "Y" and when again I expand Quarter to next level then it would change to "Q" and so on .. for months as "M".
So, while expanding and collapsing, row header should be converted to the text that we provide.
Row header should be edited in every time on expanding the hiearchy.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
37 | |
31 | |
26 |
User | Count |
---|---|
96 | |
84 | |
43 | |
40 | |
35 |