Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello guys, I'm having problems to show the right format in a measure with switch.
From a filter, I have to choose if to show my measure as a sum or as a percentage.
this is the measure I've created:
Selection = var selection = SELECTEDVALUE('Switch'[ID]) return Switch(TRUE();selection = 2; [sum]; selection = 1; [division])
where Switch is a table I have created to make my selection in a filter
This table is made by two columns:
Selection - ID
---------------------
Sum - 2
Percentage - 1
So, if a click on Sum the measure [sum] should be shown. Otherwise, the measure [division]
Both measures have been formatted individually--> [sum] as a decimal number and [division] as a percentage (so, two 0s after the comma and % symbol in my example)
ISSUE: the format for the measure [division] doesn't work!!
I tried FORMAT([divsion]; "#0,00%") but it doesn't work since FORMAT returns a text and it cannot be used in a line chart, which is my final goal.
Any ideas? I hope my explanation was clear.
Thank you so much!
If you are having measure multiply it with *100 and use card visual to display the percentage symbol
= (A/B)*100
then use card visual to display the percentage symbol
Hi,
Please try divide measure like this:
Divide = FORMAT([division],"Percent")
Hope this helps.
Best Regards,
Giotto
@MCacc -
I think your ask is very much similar to the Calculation Groups in Azure Analysis Service. Click here
Unfortunately, we cannot define calculation groups in Power BI. This requirement is already listed in the ideas sections. You can vote. https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/37146049-support-creating-calcula...
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Right, this has come up a few times recently and not sure there is always an answer for how to accomplish it. You have specified the format for your other two measures, but the third measure also has a specified format so that is the one that takes precedence and you cannot flip between different formats in a single measure other than using FORMAT. You might take a look at CONVERT.
Thank you very much for your suggestion. Unfortunately, CONVERT doesn't work either. I guess I'll have to find another way to work around it 🙂
Hi,
I think you can easily define one single measure custom fotmat in Model pane.
But in this case, it is impossible to define two different custom formats for one single measure based on slicer selected but only by format function. And format function will convert data to text which you do not want.
You can create an idea here:
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Giotto
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |