Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mpataki32
Helper III
Helper III

Measures into categories

I have 4 measures and what I would like to achieve to have a table and in that table the measures are categorized into four separated row. 

I wrote the following DAX to achieve it: 

Categories =

VAR Measure1 = SUM(Column1)
VAR Measure2 = SUM(Column2)
VAR Measure3 = SUM(Column3)
VAR Measure4 = SUM(Column4)

VAR CALC_FINAL =
SWITCH
(
    TRUE(),
    Measure1, "Measure1",
    Measure2, "Measure2",
    Measure3, "Measure3",
    Measure4, "Measure4",
    BLANK()
)

RETURN CALC_FINAL

But I am recieving the following error message: 
mpataki32_0-1664453760078.png

 



The result what I would like to achieve is: 

mpataki32_0-1664453862292.png

 


What should I do in order to fix it? 
1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Create 4 separate measures. Add the measures to the values bucket in a matrix visual. Go into the formatting pane and search for "Show on Rows" (I think it's under Values -> Options) and activate it. You will now see each measure as a row with its corresponding value





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

Create 4 separate measures. Add the measures to the values bucket in a matrix visual. Go into the formatting pane and search for "Show on Rows" (I think it's under Values -> Options) and activate it. You will now see each measure as a row with its corresponding value





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






It worked! 🙂 

mpataki32_1-1664457231047.png

 

 

amitchandak
Super User
Super User

@mpataki32 . Option 1 Switch Values on rows/ show measure on row

 

2nd calculation group - Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0 

 

Also explore field parameters

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.