cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors