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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

If with setanalysis

Hi Community,

I need to convert if condition into setanalysis as below.

if( Child_3 = 'Package'

sum(BDA) + Sum(GBA),sum(Outstand))

- Priya

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({<Child_3 = {'Package'}>}BDA) + Sum({<Child_3 = {'Package'}>}GBA) + Sum({<Child_3 -= {'Package'}>}Outstand)

or

RangeSum(Sum({<Child_3 = {'Package'}>}BDA), Sum({<Child_3 = {'Package'}>}GBA), Sum({<Child_3 -= {'Package'}>}Outstand))

View solution in original post

9 Replies
sunny_talwar

May be this:

Sum({<Child_3 = {'Package'}>}BDA) + Sum({<Child_3 = {'Package'}>}GBA) + Sum({<Child_3 -= {'Package'}>}Outstand)

or

RangeSum(Sum({<Child_3 = {'Package'}>}BDA), Sum({<Child_3 = {'Package'}>}GBA), Sum({<Child_3 -= {'Package'}>}Outstand))

priyarane
Specialist
Specialist
Author

I have pivot table child_3 is a dimension, for child3 there are multiple values like below

Child_3              Expr(for all other than 'Package', expr is sum(outstanding) for package expr is sum(BDA) + sum(GBA)

xxy                    

yyz

'Package'

sunny_talwar

Right, did the above expression not work? Can you provide a sample?

priyarane
Specialist
Specialist
Author

above expr didn't work

sunny_talwar

Would you be able to share a sample?

priyarane
Specialist
Specialist
Author

Data:

data.PNG

sunny_talwar

Seems to be working just like the if statement:

Capture.PNG

priyarane
Specialist
Specialist
Author

Thanks Sunny... it is working

sunny_talwar

Awesome

I wasn't sure what I might have been missing, but I am glad we were able to resolve it quick enough.

Best,

Sunny