Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
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?
Solved! 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(
TRUE(),
_SumSales < 1000000, FORMAT( _SumSales, "000, K" ),
_SumSales < 10000000, FORMAT( _SumSales, " 0 , , .00 Mil" ),
_SumSales
)
RETURN
_FormattedSales
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(
TRUE(),
_SumSales < 1000000, FORMAT( _SumSales, "000, K" ),
_SumSales < 10000000, FORMAT( _SumSales, " 0 , , .00 Mil" ),
_SumSales
)
RETURN
_FormattedSales
Hello @selimovd
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!.
Regards,
Yong-Jin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
72 | |
47 | |
39 | |
33 |
User | Count |
---|---|
157 | |
101 | |
60 | |
43 | |
40 |