Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Is there anyway to replicate the Sum of Rows in a Straight chart into a Text Box.
The problem I am facing is,the Total of an Expression is different when you individually calculate the expression for each quarter.
Any help would be greatly appreciated
I don't know if this is a copy paste error, but you are missing a parenthesis here:
Sum(Aggr(
(Sum({<Scenario={'Actual'}>}Clms_Vol) *
Sum({<Scenario-={'Actual'}>}Unit) *
Sum({<Scenario-={'Actual'}>}UnitPrice)),
Quarter))
You can use the aggr function: sum(aggr(sum(Something),Dimension1, Dimension2, ...etc)
try
=sum(aggr(sum(unitPerItem | * | [Unit Price] * | [Rejected Items]), Date)) |
Gysbert - Isn't that the same thing as Sum(Something) unless you have a distinct -> Sum(Aggr(Sum(DISTINCT Something), Dimension1, Dimension2, ...etc)
I tried that,its not working in my case,wit the above example following expression is used in the text box.
=(sum(aggr(sum({<Test-={'Actual'},BrandId=p(DealId)>}CostPerBundle),Quarter,Id))/
sum(aggr(sum({<Test-={'Actual'},BrandId=p(DealId)>}TotaUnits),Quarter,Id)))
*sum(aggr(sum({<Test={'Actual'},BrandId=p(DealId)>}Rejected Items),Quarter,Id))*
sum(aggr(avg({<Test={'Actual'},BrandId=p(DealId)>}unitPerItem),Quarter,Id))
Give this a try:
=Sum(Aggr(
((Sum({<Test-={'Actual'}, BrandId=p(DealId)>} CostPerBundle)/Sum({<Test-={'Actual'}, BrandId=p(DealId)>} TotaUnits)) * Sum({<Test={'Actual'}, BrandId=p(DealId)>} Rejected Items) * Avg({<Test={'Actual'}, BrandId=p(DealId)>} unitPerItem)),
Quarter,Id))
It depends on the Something.
So you mean if it is field or a bunch of calculations (like in his case a division and multiplication)?
Thanks Maxgro.....it worked well when I am just using the tree fields,but when I use the Set Analysis condition for all the three fields its not working.
Any help
Did you try this John?
=Sum(Aggr(
((Sum({<Test-={'Actual'}, BrandId=p(DealId)>} CostPerBundle)/Sum({<Test-={'Actual'}, BrandId=p(DealId)>} TotaUnits)) * Sum({<Test={'Actual'}, BrandId=p(DealId)>} Rejected Items) * Avg({<Test={'Actual'}, BrandId=p(DealId)>} unitPerItem)),
Quarter,Id))