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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis if else if else if

Hi There,

Can someone assist in converting the below if then elseif then elseif then syntax to set analysis syntax please?

IF (STATUS_Date >= Addmonths(DATE, -12) and STATUS_Date <= Addmonths(DATE, -1),sum(PAID_AMT),

IF (STATUS_Date >= Addmonths(DATE, -24) and STATUS_Date <= Addmonths(DATE, -13),sum(PAID_AMT),

IF (STATUS_Date >= Addmonths(DATE, -36) and STATUS_Date <= Addmonths(DATE, -25),sum(PAID_AMT))

))

Version of Qlikview is 8.5

Thanks,
Kevin.

2 Replies
Not applicable
Author

Hi Kevin,

try this:

SUM ({$ <STATUS_Date = {">=Addmonths(DATE,-12)<=Addmonths(DATE, -1)"} >} PAID_AMT)

Don't know for sure if that works, but its worth trying.

Regards,

Rey-man

Not applicable
Author

For better performance

I would suggest to first calculate a flag in the script (that is to say to add a field which take several value (1,2,3,4) ) then to use it in your expression

Regards