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
Anonymous
Not applicable

Tricky switch FUCNITON

Hi Experts

 

would it be possible to use the switch function to change two measure at the same time.....when a paricular selection is made using a slicer.... this is what i have done so far...

 

Set up a discount table with no relationship to the main fact table and using the following switch

 

Change measure with slicer = If (ISCROSSFILTERED((discount table [measure]), Switch (TRUE (),

Values (discount table [measure]) = “NOE”, [Measure1],

Values (discount table [measure]) = “Reported”, [Measure2],

Blank()),Blank())

 

Displays blank graph. If nothing is selected…

[Measure 1] = AOP && PY

1 ACCEPTED SOLUTION
Baskar
Resident Rockstar
Resident Rockstar

@Anonymous

Try this,

 

Final =
var _Infilter = CONCATENATEX(VALUES(discount table [measure]),discount table [measure],"-")

Return SWITCH(_Infilter,
"Mes1",[Mes1],
"Mes2",[Mes2])

 

Let me know if it is not solved your proble. 

View solution in original post

1 REPLY 1
Baskar
Resident Rockstar
Resident Rockstar

@Anonymous

Try this,

 

Final =
var _Infilter = CONCATENATEX(VALUES(discount table [measure]),discount table [measure],"-")

Return SWITCH(_Infilter,
"Mes1",[Mes1],
"Mes2",[Mes2])

 

Let me know if it is not solved your proble. 

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.