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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VincenzoChean
Helper I
Helper I

Actual vs budget Gross Profit

Hi, 

 

I have these tables

1) Actuals ( shows the actuals for the month/year in branches in different GL codes)

2) Budget ( shows the budget  for the month/year in branches in different GL codes)  

3) GL codes with categories( categories are Income/Expenses/Operating expenses) for each GL codes. 

4) branch ( different branch codes/name)

 

what i want to achive is similar to the below matrix. But I want to add Gross Profit for actual & budget.

Gross profit = Income - Cost of sales. 

 

How can i do this please. 

 

VincenzoChean_0-1650412033144.png

 

1 ACCEPTED SOLUTION

Hi @VincenzoChean ,

Here's my solution: https://drive.google.com/file/d/1Q6fheFcoEiL8dON959zf1FwUBc8T0M7S/view?usp=sharing

I ended up not using calculation groups but instead use a disconnected table to assist with the calculation - disconnected as it doesn't have any relationship to the facts or dimension tables.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
danextian
Super User
Super User

This can probably be done using Calculation Groups in Tabular Editor. Can you please post a download link to your pbix?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

please see if you can download the pbix

Hi @VincenzoChean ,

Here's my solution: https://drive.google.com/file/d/1Q6fheFcoEiL8dON959zf1FwUBc8T0M7S/view?usp=sharing

I ended up not using calculation groups but instead use a disconnected table to assist with the calculation - disconnected as it doesn't have any relationship to the facts or dimension tables.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

thanks alot. i thought of doing a Category would do what i want. 

 

but why dont we need to relationship with other the flat tables ?

If you add a relationship between the Category columns in the helper table and GL Codes table, Gross Profit will appear as blank/null so you'll end up with just the same values before adding the helper table - no GP there as Gross Profit row value doesn't exist in GL Codes.  Try creating the relationship and you'll see what I mean.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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