Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sandeepprasad_j
Creator
Creator

Help In Set Analysis Expression?

Hello Experts,

Can you please help me in writing the set analysis expression for the below if condition

If(vPer=12,sum([Amt]),(if(vPer=6, sum([Amt]))))

Thanks in advance

Cheers

Sandeep

12 Replies
tresesco
MVP
MVP

Here set analysis would not be required. Don't worry about using it. Carry on with your expression.

sandeepprasad_j
Creator
Creator
Author

Thanks everyone for your help

Cheers

smaqsood_cv
Partner - Contributor
Partner - Contributor

Hi,

You can use something like this

Sum(Pick(match(vPer,{vListOfFieldName}),{vListOfActualField}))

where

vListOfFieldName is a variable which is a concatenated list (& comma separated) of part of the field names that matches your vPer values

vListOfActualField is another variable which is a concatenated list of actual fields

E.g: if vPer values are 6, 12

then, vListOfFieldName = 6, 12

vListOfActualField = [6 Amt], [12 Amt]