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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Measure name string to measure

Hi,

I'm writing calculated groups vs target and I'm replacing one word from measure name. 

SUBSTITUTE("[" & SELECTEDMEASURENAME() & "]", "Act", "Tgt")

Do you know if there is a function to convert string "[Measure Tgt]" to measure format without quotation marks: [Measure Tgt]?

 

Thank you for you're answers

2 REPLIES 2
Anonymous
Not applicable

That's a pity. I wanted to do this more elegant than have 50 SWITCH rows.

daxer-almighty
Solution Sage
Solution Sage

DAX can't take a name of a measure and evaluate it using a mechanism like EVAL in other languges. In other words, it's not possible to have dynamically evaluated strings. If you want to do something similar, you have to use SWITCH.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.