Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I try to calculate a revenue in a chart, but the logic makes it hard to implement:
As it can be seen, the calculation depends on the row level, means that i need to calculate the Sum(PixelSum) for all rows that their PricingModel='CPA' (and then multiply the result with CPAGoal), and i need to calculate the Sum(Hits) for all rows that their PricingModel='CPC' (and then to multiply the result with CPCRate).
How do i let the chart "understand" the right calculation?
Thanks,
Guy
Hi,
Try this expression
=Sum(if(PricingModel='CPA', Sum(PixelSum)*CPAGoal, if(PricingModel='CPC', Sum(Hits)*CPCRate)))
OR
Sum({<PricingModel={'CPA'}>} Sum(PixelSum)*CPAGoal) + Sum({<PricingModel={'CPC'}>} Sum(Hits)*CPCRate)
Hope this helps you
Regards,
Jagan.
Hi,
Try this expression like,
= (Sum({<PricingModel={'CPA'}>} PixelSum)* CPAGoal) + (Sum({<PricingModel={'CPC'}>} Hits)* CPCRate)
Regards,
Iyyappan
Hi v.iyyappan,
The problem is that when i uses this expresion in the chart it works only for specific dimensions. i need this calculation to be valid for any combination of dimensions.
Thanks,
Guy
Hi,
can u attach a sample file. it helpful for us to solve your requirments.
Regards,
Iyyappan
Hi Guy,
As per your note the chart will work only for pricemodel CPA and CPC and all other dimensions related to these price model. If you need something more then please explain your requiremnt.
Regards
Vijay
Hi iyyappan & Vijay,
I have already another new post with the same tilte and attached a QVW there.
By the way, the a solution was found.