Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am looking for the syntax to aggregate the total GM% in a stacked bar. If I drill down to one customer, the GM% is correct. When all are selected, it is adding all the GM% numbers up, together. Not sure of the correct syntax in the expression?
Thanks in advance for any advise!
sum(NetRevenue)/sum(TotalRevenue)
What is the relation between NetRevenue and TotalRevenue?
I mean SUM(NetRevenue) = Total Revenue or what?
have you tried ?
sum(NetRevenue)/sum(Total<Date>TotalRevenue)
or
sum(NetRevenue)/sum(Total<Customer>TotalRevenue)
What is the dimensions you are using?
Date and Parent (which is the customer).
Are you checked 'Relative' on the expression tab of chart properties?
I tried checking the Relative box in the expression tab, but it does not give me the correct result. If I leave Relative unselected, and just select 1 customer in the legend, the calculation is correct.
What is the relation between NetRevenue and TotalRevenue?
I mean SUM(NetRevenue) = Total Revenue or what?
have you tried ?
sum(NetRevenue)/sum(Total<Date>TotalRevenue)
or
sum(NetRevenue)/sum(Total<Customer>TotalRevenue)
Can you share a snapshot of what you get when you select a single customer?
This is correct:
So, you don't want it to sum all of them? What do you want it to do instead when no customer is selected?
Woo Hoo! This solution works.
Thank you both for your help! I really appreciate how fast you responded.
Have a terrific rest of the week!