cancel
Showing results for
Did you mean:

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

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:

The result what I would like to achieve is:

What should I do in order to fix it?
1 ACCEPTED SOLUTION
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

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

3 REPLIES 3
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

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Helper III

It worked! 🙂

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

Announcements

#### Power BI Monthly Update - November 2023

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

#### Fabric Community News unified experience

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

#### 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