Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Ameya
Contributor III
Contributor III

Set analysis expression issue

Hi,

I have following 2 conditions which together makes up the revenue column


SUM({<CLASS_CODE1={'BILL_EQUAL_TO_REV'},CLASS_CATEGORY={'BILL_TO_REV'},

[LEGAL ENTITY NAME NEW]-={'A','B','C'}>}[BILL AMOUNT NEW]))     (HERE A,B,C is excluded)

+

if(match([LEGAL ENTITY NAME NEW],'A','B','C') ,Sum( [BILL AMOUNT NEW])    (Here A,B,C values are used)

 

Issue is 2nd condition value is only showing up when i am explicitly selecting A or B or C in filter (Maybe due to the if condition?)

I tried converting 2nd value to set analysis by following method

sum({<[LEGAL ENTITY NAME NEW]={'A','B','C'}>}[BILL AMOUNT NEW])

 

However now the value is showing up in 1st condition as well where A,B,C are excluded.

How can i change the expression so that each values appear seperately even when selections are not done explicitly?

 

Labels (3)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

If I understand the behavior you are looking for correctly, you need to change the 2nd expression to:

sum({<[LEGAL ENTITY NAME NEW]*={'A','B','C'}>}[BILL AMOUNT NEW])

which will give you an intersection of available [LEGAL ENTITY NAME NEW] and {'A','B','C'}, which will account for selected values in [LEGAL ENTITY NAME NEW].

View solution in original post

1 Reply
GaryGiles
Specialist
Specialist

If I understand the behavior you are looking for correctly, you need to change the 2nd expression to:

sum({<[LEGAL ENTITY NAME NEW]*={'A','B','C'}>}[BILL AMOUNT NEW])

which will give you an intersection of available [LEGAL ENTITY NAME NEW] and {'A','B','C'}, which will account for selected values in [LEGAL ENTITY NAME NEW].

View solution in original post