Hello Community,
I'm creating a label showing a formatted number, big or small, integer or decimal.
For example, this field should show numbers like this:
100
10,000
100,000.25
So I used Text() formula:
Text(Number_Value, "#,#.##")
but I noticed that in this way the integers will get an unnecessary dot behind them,
like this:
Removing ".##" did not work, because it was removing the decimal places and automatically rounding the value.
Again, I need to format the numbers like this.
100
10,000
100,000.25
I do not want an integer to have a decimal dot behind it. But I still need a thousand separators.
How can I achieve this?
thanks, that helped me!
but I was trying to understand the formula so explaining the above:
t first checks if the remainder of the 'Initial TCV' divided by 1 is non-zero. If it is non-zero, it means there are decimal places in the number
If there are decimal places, it formats the 'Initial TCV' using "#,###.##" format to display the number with two decimal places
If there are no decimal places (i.e., the remainder of the division is zero), it formats the 'Initial TCV' using "#,###" format to display the number without decimal places.
Also, I understand now that the reason you didn't put a complete criteria that Mod should return non zero by default
when you use a numeric value as a condition, PowerApps automatically evaluates it as true if the value is non-zero and false if the value is zero. Therefore, you don't need to explicitly compare the result of Mod(ThisItem.'Initial TCV', 1) to zero using <> 0.
Thank you @ChrisMendoza,
It worked like a charm! 🙂
WarrenBelz
83
Most Valuable Professional
MS.Ragavendar
54
Michael E. Gernaey
42
Super User 2025 Season 1