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
MIC_Rulz
New Member

How to use the visual's name in a measure?

I want to setup labels that will change based on filter settings but be table driven so I can have multiple labels change with a single measure.

 

Visual 1: Type: Card, Name: "Card1"

Visual 2: Type: Card, Name: "Card2"

 

Table:

Card NameCard TextLanguage
Card1Card OneEnglish
Card1Card UnoSpanish
Card2Card TwoEnglish
Card2Card DosSpanish

 

I will use a slicer to select the language option.

 

Measure?

Something Like: CardName=LookupValue(Table[Card Text], Table[Card Name], <insert visual reference>)

 

This way I can have two (or three, or six, or whatever) cards use the same measure without creating a plethora of meaures.

Is this even possible?

3 REPLIES 3
MIC_Rulz
New Member

I take it what I asked isn't possible? I wanted to reference the name of the visual to use in the measure so that I could use a single measure for all of the visuals. And so I can use the table for the text being displayed. If I add a dozen visuals to be translated I don't want a custom measure for each one. I want this table driven. That way I can add languages and cards as needed.

@MIC_Rulz ,

Apologies if I misunderstood your ask.

Honestly, I am unable to wrap my head around what you want to accomplish.  I simply thought you wanted to change the Card's Title based on the Language selected.  Sounds as if you are wanting to do something different.

I am not aware of any way to reference a visual in a Measure. 

Again my apologies for the mis-understanding.

Regards,

rsbin
Super User
Super User

@MIC_Rulz ,

Use can use the Card Visual's Conditional Formatting functionality.  This works in much the same way as Conditional Formatting.
Create a Measure such as this:

Title_Card1 = IF( SELECTEDVALUE( 'Language'[Language] ) = "English", "CARD 1", "CARD UNO" )

This assumes you have a table for your languages

Language
English
Spanish

rsbin_3-1680707808274.png

 

Once you select the fx for the Title, navigate to the Measure above.

The Title will change based on the Slicer Language selected by the User.

 Hope this works for you.

Regards,

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.

Top Kudoed Authors