The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have an issue with calculation groups. I've created calculation groups for P&L lines and put them to Matrix. Please have look at the snapshoot.
My problem is that when I am calculating a gap between forecast and previous forecast every data looks ok, except %Gross profit.
I would like to see here is -63,6 instead 90,9%. It's looks like calculation are based on ( Gross profit(FCT-PFCT) / Revenue[FCT-PFCT] ) instead of ( %Gross profit[FCT] - %Gross profit[PFCT] ).
Does anyone able do help?
I attached also pbix file. https://www.dropbox.com/s/5fy1u1vvpt0yie6/Calculation%20Groups%20Sample.pbix?dl=0
BR,
Marcin
Hi @MarcinSz ,
You can try with below Dax expression which converts the percentage values (text to divisible number) into numbers, so that Power BI Dax can perform the Calculations.
Difference_Text =
VAR fctValue = IF([Name] = "%GROSS PROFIT", VALUE(SUBSTITUTE([FCT], "%", "")) / 100, [FCT])
VAR pfctValue = IF([Name] = "%GROSS PROFIT", VALUE(SUBSTITUTE([PFCT], "%", "")) / 100, [PFCT])
VAR differenceValue = fctValue - pfctValue
RETURN
IF([Name] = "%GROSS PROFIT",
FORMAT(differenceValue, "0.0%"),
FORMAT(differenceValue, "General Number")
)
Please refer to the screenshot given below,
Thanks!
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |