Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Growth

HI Friends

I have created the following Pivot table where Ach % and Growth % need to be calculated

YEAR201320142015
GROSS_PREMIUM645,137,085707,202,807251,743,928
ACH %789089
GROWTH %---

my expression for calculation of Growth is as follows but the result is not calculated. Pls see whether there is any error in the expression

YEAR is a dimension field

(sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {"$(=Only([YEAR]))"}>} [ACTUAL] )

-sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {"$(=Only([YEAR]-1))"}>} [ACTUAL] ))

/Fabs(sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {"$(=Only([YEAR]-1))"}>} [ACTUAL] ))*100

Labels (1)
6 Replies
Not applicable

Try like this for growth:

(((sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {"$(=Only([YEAR]))"}>} [ACTUAL] ))

/(Fabs(sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {"$(=Only([YEAR]-1))"}>} [ACTUAL] ))))-1)*100

If still not working can u share qvw for above.

Thanks

Khushboo

tresB
Champion III
Champion III

Is DESCRIPTION a field and 'GROSS_PREMIUM' is a field value to it? If so, put the string within single quotes like:

sum( {$<DESCRIPTION = {'GROSS_PREMIUM'},..

Not applicable

Try this:

(sum(<{description= {gross_premium}, Year={"$(=Only([YEAR]))"}  }> [Actual]) /

sum(<{description= {gross_premium}, Year={"$(=Only([YEAR]-1))"}  }> [Actual]))-1

er_mohit
Master II
Master II

Hi

Try this

(sum( {$<DESCRIPTION = {'GROSS_PREMIUM'},YEAR = {'=$(=max([YEAR]))'}>} [ACTUAL] )

-sum( {$<DESCRIPTION = {'GROSS_PREMIUM'},YEAR = {'=$(=max([YEAR])-1)'}>} [ACTUAL] ))

/

Fabs(sum( {$<DESCRIPTION = {GROSS_PREMIUM},YEAR = {'=$(=max([YEAR])-1)'}>} [ACTUAL] ))*100

upaliwije
Creator II
Creator II
Author

Now the output is like this

GROSS_PREMIUM298,965,722292,783,955348,247,713372,504,375
ACH %928410590
GROWTH0.000.000.000.00
tresB
Champion III
Champion III

I guess you could help us help you by sharing your qvw with sample data.