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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors