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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Iwin
Partner - Creator
Partner - Creator

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].