Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
BouwerVa
New Contributor II

Set Analysis & Alternate State

Hi

I'm stuck. I have a pivot table with an Alternate State Assigned to it (As Seen Below).

Capture.PNGI need to show the Current Year Amount which is correct and next to it the growth of from the previous year. But with my Set Analysis that I used is still returns the Current Year Value.

sum({<tYEAR= (tYEAR - {1})>} C_TOTAL)

Not sure what I'm doing wrong.

Labels (2)
4 Replies
Partner
Partner

Re: Set Analysis & Alternate State

Hello,

Your set analysis syntax isn't correct, but you don't need it for your calculation. Into a pivot table, you can use  Before (follow this link to see more) to do that. Substitute your previous expression by this:

Before(Sum(C_TOTAL), 1)

cordially. 

BouwerVa
New Contributor II

Re: Set Analysis & Alternate State

WHAT!!!! That Easy!!!

You are awesome. 

Thank you very much.

Partner
Partner

Re: Set Analysis & Alternate State

Yu're welcome. Don't forget to cloturate your post as resolved 😀.

cordially.

Sameer9585
Contributor II

Re: Set Analysis & Alternate State

Hi @BouwerVa ,

 

Try this as per my understanding this works

 

sum({<tYEAR= addyears(tYEAR,-1)>} C_TOTAL)