Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Note, I am currently working with Excel, Power Query, and Power Pivot, and will move this is to Power BI model in the near future.
I am attempting to create a slicer where the user can then change the measure easily, and found this how here, and got it work ok
hXXps://sqljason.com/2012/11/measure-selection-using-slicers-in.html
But the issue I'm facing is that when I format a particular measure, the values in the pivot table switch to text and you can not highlight them and get a total, etc.
This is the basic measure:
MsrValue:=switch (TRUE,
Min ( MyMeasures[ID] ) = 1, [Amount],
Min ( MyMeasures[ID] ) = 2, Format([Last 3 Amount], "Currency"),
Min ( MyMeasures[ID] ) = 3, [YTD Amount]
)
And when using that in a pivot table, the measure formatted as currency appears as text in the pivot table, while the other 2 will show as a number value. You can see that here below as the Last 3 Amount formatted in Currency is left justified in the values.
Solved! Go to Solution.
@ptmuldoon , Option 1
Use field parameters with individual formatted measures
Option 2
Use Dynamic format String
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-the-new-dynamic-format-strings-for-measures/
https://youtu.be/qHALucET7N8
Or Use calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/
Hi @ptmuldoon,
Current you can't use one measure expression to return multiple result data types. (notice: format function will change the result of text type)
Regards,
Xiaoxin Sheng
@ptmuldoon , Option 1
Use field parameters with individual formatted measures
Option 2
Use Dynamic format String
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-the-new-dynamic-format-strings-for-measures/
https://youtu.be/qHALucET7N8
Or Use calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/