Forum Discussion
Format negative numbers in red parenthesis
- 9 years ago
Hi Miskondukt,
Currently, there is no OOTB option for us to format the negative number as (value) and keep the number data type at the same time. We can only create a calculated column below to return (value) format but the result will be treated as TEXT instead of number, and Conditional Formatting is not available.
Column = IF('Table2'[Column1]<0,"(" & FORMAT('Table2'[Column1],"General Number") & ")" ,FORMAT('Table2'[Column1],"General Number"))For your requirement, you can submit a idea here.
Best Regards,
Qiuyun Yu
I tried this but in all of my other columns I am showing data in Millions. And I'm also showing it with no decimal places. Is there a way to use this to remove the decimal places and to show an M after the value because the format field option is no longer available for this field once I use the format function.
Also, it's still showing the - symbol inside of the parens. I just want the parens.
I haven't tested this, but PBI formatting works similarly to Excel and C# formatting. So, you should be able to add two commas after the string to divide the number by a million, then add "m" or " m" (if you want a space before the m) after the number. Try something like this: #,##0,," m";(#,##0),," m";0
See these links for more detail on Excel and c# formatitng strings. The comma section in the Excel link explains the divide by a million trick I used above:
https://exceljet.net/custom-number-formats
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
- joann717 years agoRegular Visitor
thank you!!