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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MarcinSz
Frequent Visitor

Calculation groups - gap calculation

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?

 

Capture.PNG

 

I attached also pbix file. https://www.dropbox.com/s/5fy1u1vvpt0yie6/Calculation%20Groups%20Sample.pbix?dl=0

 

BR, 

Marcin

1 REPLY 1
SamInogic
Super User
Super User

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,

SamInogic_0-1719395388985.png


Thanks!

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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