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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
feralvarez994
Helper II
Helper II

Change dax name by selecting value

Hi everyone! I have a SWITCH dax that returns different values depending on the user selection, the thing is that i want to show different names by the value chosed by the user. This is the syntax of the dax used

 

Variable =
var variable = SWITCH( TRUE(), [Selected Metric] = "Bruto" && [Selected Moneda] = "Pesos", [Bruto Total],
[Selected Metric] = "Neto" && [Selected Moneda] = "Pesos", [Neto Total],
[Selected Metric] = "Costo Total" && [Selected Moneda] = "Pesos", [Costos Total],
[Selected Metric] = "Bruto" && [Selected Moneda] = "Dolares", [Bruto USD],
[Selected Metric] = "Neto" && [Selected Moneda] = "Dolares", [Neto USD],
[Selected Metric] = "Costo Total" && [Selected Moneda] = "Dolares", [Costo Total / USD])

return IF(ISBLANK(variable), 0, variable)
 
feralvarez994_0-1654878724058.png

 

The thing is that when i show that Variable in the Table, it shows always the same title ("Variable") and i want it to retrieve different name by the Metric chosed before (Bruto/Neto/Costo Total)
 
Thank you everyone!
3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @feralvarez994 ,

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team _ kalyj

v-yanjiang-msft
Community Support
Community Support

Hi @feralvarez994 ,

According to your description, your formula is not creating a dynamic measure name, but dynamic value based on different condition. As @ribisht17  mentioned, dynamic measure name can't be created. If you want to get the expected result, you can create a new table like this:

vkalyjmsft_0-1655367912673.png

Put it in the Matrix Columns, then create a measure use SWITCH like yours to calculate the different values according to the new column.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ribisht17
Super User
Super User

@feralvarez994 

 

 There are no dynamic names for measures.

As of now only you can have a dynamic table/visual title.

You can vote for an idea or log a new one. https://ideas.powerbi.com/ideas/

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.