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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Pikachu-Power
Impactful Individual
Impactful Individual

split switch true measure

Hello all,
 
I have an extensive SWITCH TRUE Measure like following simple example: 
 
SWITCH(TRUE,
SELECTEDVALUE(Table[Row]) = "A", Measure1,
SELECTEDVALUE(Table[Row]) = "B", Measure2,
SELECTEDVALUE(Table[Row]) = "C", Measure3,
SELECTEDVALUE(Table[Row]) = "D", Measure4,
SELECTEDVALUE(Table[Row]) = "E", Measure5
SELECTEDVALUE(Table[Row]) = "F", Measure6,
SELECTEDVALUE(Table[Row]) = "G", Measure1 + Measure 2 + Measure 3 + Measure4 + Measure 5 + Mesaure 6,
and so on
 
Now I want filter Measure2 until Measure6 like 
IF(SELECTEDCALCULATE(Table2[Row]) = "X", CALCULATE(Measure1, Table[Row2] = "X"), CALCULATE(Measure1, Table[Row2] = "Y"))
 
But Measure1 stays untouched.
 
It would be a lot of work to go through every measure in this way... is there a way to do it more compact/easy?
 
Maybe there is a way to split the SWITCH TRUE Measure in two parts? One with Measure1 and one with Measure2 to Measure6. Then the IF(SELECTEDVALUE(... part could be applied to the whole second SWITCH TRUE Measure.
 
Many thanks for ideas.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pikachu-Power , try calculation groups

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Pikachu-Power , try calculation groups

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.