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
IF
Post Prodigy
Post Prodigy

negative value in bracket

Hi,

I have a column that is called "project". its format is decimal number. I want to show negative values with brackets. I tried to make a measure (Measure=FORMAT([Project];"##,###;(##,###);-")

The PowerBI highlights under Project as if it doesn't recognize it. What should I do?

 

Best,

2 ACCEPTED SOLUTIONS

@IF ,

What is [Project] exactly? Is it Measure or just a fields or Calculated column?

If it is field from table so try to use aggreagation like SUM,MAX etc.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

@IF ,

Use the below DAX:

MEASURE = IF(SUM(Sheet6[Value])<0,"("& SUM(Sheet6[Value])&")", SUM(Sheet6[Value]))
Capture.PNG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

@IF 

 

So you have to turn your column PROJECT into a measure. There are too many values, so you need to use MAX/MIN/SUM/etc. to tell the measure what specific value to turn into that format.

 

You will need two measures, for example:

 

Measure1 = MAX(Table[Project])

 

Measure2 = FORMAT( [Measure1], "###,###; (###,###); -")

 

(make sure to use more # if your numbers go into the millions i.e. "#,###,###; (#,###,###); -"

Hi,

Thanks it works,  but the total gives wrong sum. How can I display correct sum?

 

Best regards,

Tahreem24
Super User
Super User

Refer the below video:

https://youtu.be/dNLuTqg938A

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Or you can also try using Dax:

= IF([Project]<0,&"("& [Project]&")", [Project])

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Hi,

When I type [Project], the power bi doesn't recognize it. it underlines it with red unfortunatelly.

@IF ,

What is [Project] exactly? Is it Measure or just a fields or Calculated column?

If it is field from table so try to use aggreagation like SUM,MAX etc.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@IF ,

Use the below DAX:

MEASURE = IF(SUM(Sheet6[Value])<0,"("& SUM(Sheet6[Value])&")", SUM(Sheet6[Value]))
Capture.PNG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Hi,

Thank you very much for the help. it helps. The last issue if you could help: when I put brackets, I don't want to see the minus sign. it should be for example; -3 or (3) However, the sum should be as you showed. For example; (3)+4 sum:1 Is there any possibility not to show the minus value?

 

Regards,

IF

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.