Forum Discussion
magnifybi
6 years agoResolver I
How to format my SWITCH Measure as Currency and integer depending on filter
Measure Selection = SWITCH( TRUE(), VALUES('Measure Dimensions'[Measure]) = "Total Sales", Transactions[Sales Value Total], VALUES('Measure Dimensions'[Measure]) = "Total Quantity", Transacti...
emilmorkeberg
4 years agoFrequent Visitor
From my understanding what you want to do is having the Total Quantity and Total Transactions as whole numbers and Total Sales as $. You can do that in the Switch by using the formula below, however the output will be a string, thus you cant sort it AFAIK.
Measure Selection =
SWITCH( TRUE(),
VALUES('Measure Dimensions'[Measure]) = "Total Sales", FORMAT(Transactions[Sales Value Total],"Currency"),
VALUES('Measure Dimensions'[Measure]) = "Total Quantity", Transactions[Quantity Total],
VALUES('Measure Dimensions'[Measure]) = "Total Transactions", Transactions[Transaction Count], BLANK())
You could also just use 3 bookmarks (by creating 3 buttons) instead of the switch and by that format the Total Sales measure as $ and the two others and whole numbers.
EDIT: Just saw this thread was made in 2020... 🙂