Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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)
Solved! Go to 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. 🙂
Check out it at here:
https://msdn.microsoft.com/en-us/library/ee634206.aspx
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. 🙂
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |