cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mpataki32
Helper II
Helper II

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
Super User
Super User

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
Super User
Super User

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

 



Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || Learn 50+ Power Query List Functions
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!!! How to get Quick Help !!
Resources | Master Power BI !! Expertise Power BI !! Power BI For Tableau User !!

Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.