Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression answer

hello,

i have a table with this data:

Year    |  Total

2001    |    2

2002    |    4

2003    |    6

i put this into a chart table and i need to make an expression  on the line 2002 doing the follow thing:

Year    |  Total   |   Expresion

2002    |    4     |  total2002/Total2001 - 1 = 1

2003    |    6     | total2003/Total2002 - 1 = 0,5

and so forth with a table of many more values

.

how would be this expression?

tnk's,

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Yes, right. You probably use a pivot table chart, then?

The chart inter record functions like above(), before() are depending on your dimension values orientation and sort order, so you must pick the right one for your needs (and take care for the case user changes sort order 😉

View solution in original post

3 Replies
swuehl
MVP
MVP

Try something like

=TOTALFIELD / above( TOTALFIELD ) -1

where TOTALFIELD is the field name which contains your total (or use sum(Value) if you need to calculate your total).

Not applicable
Author

thanks for your suggestion, it was useful for me....

the expression works to me with "before"

total/before(total)-1

swuehl
MVP
MVP

Yes, right. You probably use a pivot table chart, then?

The chart inter record functions like above(), before() are depending on your dimension values orientation and sort order, so you must pick the right one for your needs (and take care for the case user changes sort order 😉