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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
djbuncle
Helper I
Helper I

Convert DAX variable string to impersonate measure

Hi. I am try to implement a 'universal measure' that masquerades as other ones I've already created, and also use it in a different calculation depending on a selected value of another dimension attribute. So my attribute 'Universal Metic'[Cube Measure Name] lists the avaiable measures to use, and then 'Universal Metric'[UM Calc Method] is a list of values describing how we want to use the measure (eg. default, previous month, varince vs last month etc).

Now I know I could use a switch statement to evaluate the selected [Cbe Measure Name] but when I have 100+ actaul measures this becomes unmanagable. Therefore my question is, is there a way to treat my VAR UniMeasure as the actual measure instead of it just being the string value? I was hoping there was a function I could wrap around the highlighted statement in the calculation below which would effectively be CONVERT_STRING_TO_MEASURE().

UniMeasureDax.png

 

 

 

 

 

 

 

 

Hopefully someone has tried this before and succeded, or has a work around?

Thanks.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@djbuncle ,

 

There is already an idea, you may leave a comment and vote it up.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@djbuncle ,

 

There is already an idea, you may leave a comment and vote it up.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The link to the possible solution isn't working anymore.

 

Do you know where i can find the solution for this question.

 

Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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