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.

No Chart Values if DAX format?

Storred in an other table (Costs_Matrix), I would like to select in a slicer a measure to display. For example if I would like to see measure "CHF", then I just have to select this on my Slicer. This is working absolutly fine. Issue comes later:

 

Value =

VAR MySelection =

SELECTEDVALUE(Costs_Matrix[Key-Figures])

RETURN

SWITCH (

TRUE ();

MySelection = "CHF"; ([PC_CHF]);

MySelection = "CHF per Drop"; ([PC_CHFperDrop]);

MySelection = "CHF per HL"; ([PC_CHFperHL]);

MySelection = "CHF per Ton"; ([PC_CHFperTons]);

MySelection = "Drops"; [PC_Drops];

MySelection = "Tons"; ([PC_Tons]);

MySelection = "HL"; ([PC_CHFperDrop]);

[PC_Drops]

)

 

As far as good. Now I would like to change the Format in the chart / table automatically. Means, if I select "CHF" I would like to have the numers (data's from Measure PC_CHF) as currency. If select Drops (data's from Measure PC_Drops), I don't want to see decimals. So I tought this should be very easy, that's what I tried:

 

MySelection = "CHF"; Format([PC_CHF];”Currency”);

MySelection = "Drops"; Format([PC_Drops];”#”);

….

 

Unfortunatelli this is not working in any type of chart. Yes it is working in tables, but this is not what I need. I have the feeling that this has in general something to do with FORMAT, no more the rest of the formula.
Do you have any explenations / solutions there for?

 

Would be great to here from someone of you
Thanks a lot in advance

Status: New
Comments
v-jiascu-msft
Employee

Hi @Anonymous,

 

What's the return value of this measure? I guess it's a non-numeric value. That's why we can't add it in other visuals other than Table. I would suggest you create an idea here for a more functional format conversion.

 

Best Regards,

Dale

Anonymous
Not applicable

Hi @v-jiascu-msft

 

Exactly this will be to problem.

But does nobody else would like to change format if filtering?

 

BR
Matthias

Anonymous
Not applicable

Hi @Anonymous,

 

I´m actually struggling with a problem very similar to yours (my post). So you´re actually not the only one facing this issue. Unfortunatelly it doesn´t seem that there is a proper solution for that at the moment...

 

Best,

Eric

Ivan93l
Frequent Visitor

Any update on this topic?