My client asked if the card can show 3 digits no matter what the numbers are.
For example, for the cards, the numbers are showing up with automatic unit display: 4M, 133K, 3000, 100, etc.
The client asked if I can make the card always show 3 significant digits and I don't know how to do it.
He is expecting for 4M number in the card, it should show 4.XXM now but for 133K, it should stay the same without any decimal number.
Is there a way for me to achieve what is being asked over here?
Go to Solution.
Hey @yjlee1212 ,
you can check the numbers and then return a different value with the FORMAT string.
A while ago I wrote a blog article how you can do a automatic scaling (give back as Billion, Million, Thousand or without any scaling):
Dynamic scaling of a measure in Power BI with DAX - What the fact.bi
The mechanism should be the same for you, something like this should work for you:
SUM Sales dynamic =
VAR _SumSales = SUM( FactInternetSales[SalesAmount] )
VAR _FormattedSales = SWITCH(
_SumSales < 1000000, FORMAT( _SumSales, "000, K" ),
_SumSales < 10000000, FORMAT( _SumSales, " 0 , , .00 Mil" ),
View solution in original post
Thanks for showing me the solution. This was exactly what I needed. I made some minor addition to the logic and it works like a magic! I really appreciate it!.
Check out new user group experience and if you are a leader please create your group!
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.