Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am applying the following expression to calculate the growth rate as per user selection and it is working fine. But when I have negative figure of Premium for Previous period growth rate calculates wrong rate.
Eg Premium for the Current period is 100,000
Premium for the previous period is -25,000
Growth Rate given by the following expression is -500%
But the correct rate should be 500%
pls help me correct the expression to calculate correctly
(sum({$<PERIODID = {"<=$(=Max(PERIODID))"},YEAR ={$(=Max(YEAR))},QUARTER =,MONTH =,PERIOD =>}[PREMIUM])
-sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM]))
/sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM])*100
Fab(
(sum({$<PERIODID = {"<=$(=Max(PERIODID))"},YEAR ={$(=Max(YEAR))},QUARTER =,MONTH =,PERIOD =>}[PREMIUM])
-sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM]))
/sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM])*100)
You can calculate the absolute value of the growth rate by using the fabs function:
fabs( ...your_expression_here... )
Dear Gysbert
Where should I actually type fabs command. Kindly reproduce my expression having inserted the fabs function in the right place
Thanks
Fab(
(sum({$<PERIODID = {"<=$(=Max(PERIODID))"},YEAR ={$(=Max(YEAR))},QUARTER =,MONTH =,PERIOD =>}[PREMIUM])
-sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM]))
/sum({$<PERIODID = {$(=Max(PERIODID)-12)},YEAR =,QUARTER =,MONTH =,PERIOD =>}[PREMIUM])*100)
It is working
Thanks a lot