Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everyone,
I have a measure with a whole number result which can range from 0 to 2 million based on filter selection.
Is there an option in Power BI where I can control the decimal places displayed based on the value. When I keep the Decimal Places Option as Auto, The measure shows value like 1.00 and 1.42M. The decimal places ae OK in the latter,but really not needed in the former.
When I keep the Decimal Places to 0, it is shown up as 1 and 1M, In this case the latter loses some required information.
I am aware of the format function, but would like to know if there any other method so that measure can remain a Decimal/Whole Number and not a string.
Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
Create a measure to realize it,such as below:
Measure = IF(SELECTEDVALUE('Table (2)'[Decimal option])="Auto",FORMAT(CONCATENATE(MAX('Table'[Column1]),"M"),"fixed"),FORMAT(CONCATENATE(ROUND(MAX('Table'[Column1]),0),"M"),"general number"))
And you will see:
For the related .pbix file,pls click here.
Hi @Anonymous ,
Create a measure to realize it,such as below:
Measure = IF(SELECTEDVALUE('Table (2)'[Decimal option])="Auto",FORMAT(CONCATENATE(MAX('Table'[Column1]),"M"),"fixed"),FORMAT(CONCATENATE(ROUND(MAX('Table'[Column1]),0),"M"),"general number"))
And you will see:
For the related .pbix file,pls click here.
@Anonymous , There is a setting in data format for the number of the decimal place.
or refer to this
https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings
Hi @Anonymous ,
Please check this solution.
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |