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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to show specific value, when particular measure has been selected

Hi , i want to show some values in card format based on measure selection , i have tried below ones but didn't get correct output.

My values are populated using measures in UI.

Shubham_Yadav_0-1683611560746.png

 

and I want to detect selected measure name and show some values respective of it. As shown below. However it always show default value 4.

 

Test2 =
Switch ( True(),
 SELECTEDMEASURENAME()="Flag1",1,
 SELECTEDMEASURENAME()="Flag2",2,
 SELECTEDMEASURENAME()="Flag3",3,
4)
 
I also tried with selectedvalue , but it takes column names as input but not measure name.
As I'm new to this any help will be thankfull.
 
3 REPLIES 3
johnt75
Super User
Super User

You need to create a calculation group using Tabular Editor and add a calculation item which uses the SWITCH statement from your code. Apply the calculation group as a filter on the card visual.

Anonymous
Not applicable

Hi @johnt75  thanks for reply, can you share some resource how you are asking to do as i'm bit new

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors