cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marcuswashere Helper I
Helper I

Gross Margin Calculation

Hi I am trying to calculate the Gross Margin of Revenue / Non Revenue line items, my formula is below however it is not producing the desired result, hoping someone can help.

Gross Margin =
DIVIDE(
sum('Fact'[Actual])
,CALCULATE(sum('Fact'[Actual]), FILTER('Grouping','Grouping'[DBC_Grouping] = "Rental Revenue"))
,BLANK()
)

 

Desired Output:

Row LabelsSum of ActualGross Margin
Revenue261769796.6100.00%
Salaries-18338513.32-7.01%
Utilities-25995159.38-9.93%
Repairs & Maintenance-22138558.91-8.46%
Other Property Operating-53842110.66-20.57%
Grand Total141455454.454.04%

 

Output based on current formula:

Row LabelsSum of ActualGross Margin
Revenue261769796.6100.00%
Salaries-18338513.32 
Utilities-25995159.38 
Repairs & Maintenance-22138558.91 
Other Property Operating-53842110.66 
Grand Total141455454.4 
1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: Gross Margin Calculation

Try using ALL() in your filter statement;

 

DIVIDE(
sum('Fact'[Actual])
,CALCULATE(sum('Fact'[Actual]), FILTER(ALL('Grouping'),'Grouping'[DBC_Grouping] = "Rental Revenue"))
,BLANK()
)

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂


Did I answer your question? Mark my post as a solution!
Kudo's are appreciated and considered a motivation.

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Super User I
Super User I

Re: Gross Margin Calculation

Try using ALL() in your filter statement;

 

DIVIDE(
sum('Fact'[Actual])
,CALCULATE(sum('Fact'[Actual]), FILTER(ALL('Grouping'),'Grouping'[DBC_Grouping] = "Rental Revenue"))
,BLANK()
)

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂


Did I answer your question? Mark my post as a solution!
Kudo's are appreciated and considered a motivation.

Proud to be a Datanaut!

View solution in original post

Highlighted
marcuswashere Helper I
Helper I

Re: Gross Margin Calculation

@JarroVGIT  Brilliant!!!  Thank you for that.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors