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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hymieho
Resolver I
Resolver I

Custom FORMAT to add brackets/parentheses to negative numbers ALSO shows pre-pended hyphen/dash

Below is my DAX for adding handling the formatting of numbers that will be displayed in cards. It works great, however negative numbers are being shown as -($935). Where is the hyphen/dash coming from & how do I suppress it?

 

Thanks!

 

RM (LCUR) Display = 
VAR
Total=
IF(
HASONEVALUE('Booked Order'[Region]),
SWITCH(VALUES('Booked Order'[Region]),
"NA", IF(ABS(SUM('Booked Order'[RM (LCUR)])) > 999999, FORMAT(SUM('Booked Order'[RM (LCUR)]),"$#,##0,,.00M;($#,##0,,.00M)"),
IF(ABS(SUM('Booked Order'[RM (LCUR)])) > 999, FORMAT(SUM('Booked Order'[RM (LCUR)]),"$#,##0,K;($#,##0,K)"),
FORMAT(SUM('Booked Order'[RM (LCUR)]), FORMAT(SUM('Booked Order'[RM (LCUR)]),"$#,##0;($#,##0)")
))),
"EMEA", IF(ABS(SUM('Booked Order'[RM (LCUR)])) > 999999, FORMAT(SUM('Booked Order'[RM (LCUR)]),"€#,##0,,.##M;(€#,##0,,.##M)"),
IF(ABS(SUM('Booked Order'[RM (LCUR)])) > 999, FORMAT(SUM('Booked Order'[RM (LCUR)]),"€#,##0,K;(€#,##0,K)"),
FORMAT(SUM('Booked Order'[RM (LCUR)]), FORMAT(SUM('Booked Order'[RM (LCUR)]),"€#,##0;(€#,##0)")
)))
),
0
)
RETURN
IF(ISBLANK(Total),0,Total)

 

 

1 ACCEPTED SOLUTION

And inexplicably it is working this morning?! Makes no sense but I'm going to leave this topic up to save someone their sanity. 🙂

View solution in original post

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

Check out it at here:

 

https://msdn.microsoft.com/en-us/library/ee634206.aspx

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Right, the pattern in the documentation is what I am using to have negative numbers in brackets, and in the example there is no negative sign outside the brackets. Here is what I am getting for -935: -(€935) 

 

Why is the negative sign coming in when my format string for negative numbers does not say to put one?  

And inexplicably it is working this morning?! Makes no sense but I'm going to leave this topic up to save someone their sanity. 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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