I want to calculate Aggregate Sales for 2 different time periods using the below formula.
Power((V(tn)/V(to)),1/(tn-to)) - 1
Where
V(tn) = Aggregate Primary Sales Quantity for last period of selection
V(to) = Aggregate Primary Sales Quantity for first period of selection
tn-to = Number of periods(For eg.if I have selected 2012 Q2 and 2013 Q3,so tn-t0 will be 5)
Here tn & t0 can be Year,Quarter and Month
For eg : Sales calculation for 2013 Q3 and 2012 Q2 will be
1.On selecting 2 years,
(pow(Sales of 2013 Year/sales of 2012 Year),1/(2013-2012)-1 )
where (2013-2012)=1(count of Years)
2.On selecting of 2 Quarters,
(pow(Sales of 2013-Q3/sales of 2012-Q2),1/(2013Q3-2012Q2)-1 )
where (2013Q3-2012Q2)=5(count of Quarters)
3.On selecting of 2 Months,
(pow(Sales of 2013-Jul/sales of 2012-Aug),1/(2013Jul-2012Aug)-1 )
where (2013Jul-2012Aug)=8(count of Months)
Can anyone please help me out on the above query.
Regards,
hari