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! I need to format a column so that the significant figures are consistent throughout (for example, 204 and 12 would be 204 and 12.0). I've tried every format and data type I can find, but always end up with a certain number of decimal places, not digits.
Any advice would be greatly appreciated! Thanks-
Solved! Go to Solution.
I don't know of any function that could do it on its own, but would it be a possibility for you to set it up yourself using something like a switch?
If you know you have numbers between 0 and 999, something like this:
Measure = SWITCH(TRUE(), [number] < 100, FORMAT([number], "0.0"), [number] < 10, FORMAT([number], "0.00"),
FORMAT([number], "0"))
with [number] as whatever measure/column you need to format. If you don't know what range of number you'll have... I'm not sure if there's a neat way to go about it without reinventing the wheel.
I don't know of any function that could do it on its own, but would it be a possibility for you to set it up yourself using something like a switch?
If you know you have numbers between 0 and 999, something like this:
Measure = SWITCH(TRUE(), [number] < 100, FORMAT([number], "0.0"), [number] < 10, FORMAT([number], "0.00"),
FORMAT([number], "0"))
with [number] as whatever measure/column you need to format. If you don't know what range of number you'll have... I'm not sure if there's a neat way to go about it without reinventing the wheel.
That did it! Thank you so much!
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |