Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.