Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
My finance department has asked that the currency columns be format from -£5,000 to (£5,000)
I've tried a few options but I can't get this to work when the column is a measure...
Variance = FORMAT ( CALCULATE ( SUM ( Margin[Cont Margin] ) - SUM ( Margin[Cont Budget] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Week] <= MAX ( 'Calendar'[Week] ) ) ), "£#,##0;(£#,##0)" )
The column is a calculating a cumulative variance over the weeks which needs formatting. The formatting works for any other column except a measure...
Any tips would be great, cheers
Solved! Go to Solution.
Do it in two steps:
Measure 2 = VAR myCalc = CALCULATE(100) RETURN FORMAT(myCalc,"£#,##0;(£#,##0)")
Perhaps the issue is with your calculation? I did something very simple:
Measure 2 = FORMAT(-100,"£#,##0;(£#,##0)")
This came out as:
(£100)
Positive numbers came out as:
£100
Seemed to be right.
Unfortunately this doesn't work with Calculate...
The formula for the measure works as expected, but as soon as I add the FORMAT(CALCULATE( it breaks.
Error in Table
Hi,
it does work with calculate function. But just be aware that using format function converts the value into a string / text data type.
I am using this function for the measure displayed in the matrix table with the option "no calculation" and not having any problem. Unfortunately such measure cannot be used in any line or stacked columns charts.
You know I actually have exactly the opposite problem. The US $ defaults to showing negatives like so ($100)
In Excel we have better Formatting options as you know and can see in the picture
But I was just surpised to find out you don't even have this option in the Excel Formatting for the pound
We need this option to be available for all currencies in PBI
And I hope they add it someday.....
Do it in two steps:
Measure 2 = VAR myCalc = CALCULATE(100) RETURN FORMAT(myCalc,"£#,##0;(£#,##0)")
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
47 | |
46 |