Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Show negative number with Brackets and in red

Hi Experts

 

How do you show negative numbers in brackets and as red in power bi....

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

@Anonymous
the conditional formatting is only for Table and Matrix visuals, but you can use it on the measures as well as columns
for the brackets you can use FORMAT
https://msdn.microsoft.com/query-bi/dax/custom-numeric-formats-for-the-format-function



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

4 REPLIES 4
javi0unavailabl
Resolver II
Resolver II

Depending your goal you can achieve this using different methods.

 

I suggest one:

Create new calculated column where DAX is:

NewColumn = IF(INT('Table'[value]) < 0 | "(" & 'Table'[value] & ")" | 'Table'[value])

Note that 'Table'[value] is type string. This is necessary for concatenating brackets.

 

Which visualization you will use to show this behavior? In Table visualization you can use Conditional Formatting under Format tab to achieve red color goal.

 

Let me know if this helps you.

 

Regards.

Stachu
Community Champion
Community Champion

you can change it with conditional formatting
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Hi Stachu..

 

Thanks for the feedback, my fault should have mentioned that its a measure that i am trying to apply the rule too.. And i do not get the CF option on the measure..

Stachu
Community Champion
Community Champion

@Anonymous
the conditional formatting is only for Table and Matrix visuals, but you can use it on the measures as well as columns
for the brackets you can use FORMAT
https://msdn.microsoft.com/query-bi/dax/custom-numeric-formats-for-the-format-function



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.