cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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)

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
Community Support

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

Community Support

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:

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.

Super User

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