Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Go-Anna
Contributor III
Contributor III

Formula for Net Margin problems

This is my Net Margin Formula:

Net Margin = sum(aggr(((([Hourly Sales Rate]*[No of Charged Hours])-(([Wage Cost per Hour]+[Overhead Cost per Hour])*[No of Charged Hours]))/([Hourly Sales Rate]*[No of Charged Hours])),[Income Travel],[Hourly Sales Rate], Period,[Project Activity Nr and Name],[Project Nr and Name],[Cost Centre and Name]))

It works perfectly. The problem is that I need a Net Margin % 

Net Margin % =Net Margin/([Hourly Sales Rate]*[No of Charged Hours])

When I add this I get the correct %-age on the rows, but not as totals???

Go-Anna_1-1607280227218.png

Why is this and what can I do?

1 Solution

Accepted Solutions
Nicole-Smith

You have no aggregation function around your denominator--if you add a sum() around it, the value will appear.  You will need to determine if the result is what you are expecting or not though.

View solution in original post

2 Replies
Nicole-Smith

You have no aggregation function around your denominator--if you add a sum() around it, the value will appear.  You will need to determine if the result is what you are expecting or not though.

Go-Anna
Contributor III
Contributor III
Author

Thank you thank you thank you! YEEESSS! now its perfect 💃🙏