Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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... 🙂
I Totally understand you, I have the same issue. I wrote sth like this, but the problem is that it is a string format, so that it doesnt order the column descending or ascending properly. Have you find a better way? Thanks
@magnifybi , refer if this can help
Hey, thanks for the reply, I don't see how that thread helps with my formatting of the results, have I missed something?
Hi @magnifybi ,
Sorry, based on the formula you gave, I could not quite know your scenario.
Please try to format the columns involved in the formula to the data type you want.
If I mistake, you can paste some screenshots, or share the sample pbix via cloud service like onedrive for business.
Please mask any sensitive data before uploading
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Liang,
Essentially the first SWITCH option is a currency ($) and the reset are just whole numbers, I can only format the whole measure as one or the other, but wanted to know if I can chnage the formula so that when I use a filter to SWITCH between the measures I want the formatting to correspond to the respective SWITCH choice.
Thanks,
J
Hi @magnifybi ,
It is very difficult to analyze without looking at the data and just by imagining. See if you can paste the screenshot of the detail representing any sample data or share the sample pbix via cloud service like onedrive for business.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Example here, you can see I've selected Sales and it doesn't show a $ amount is just shows a number, I want quantity to be a whole number but sales to be a $
User | Count |
---|---|
93 | |
86 | |
78 | |
72 | |
66 |
User | Count |
---|---|
115 | |
106 | |
85 | |
65 | |
64 |