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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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