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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikBeginner1
Creator
Creator

Set Expression flags

Hi,

I am building a report and just trying to get my set expression correct.

I have created multiple flags, BBNIFLAG01,02,03 is what generates the report from the QVD. I need to create a report where the flags are '1'. There are two other flags which need to be included, where the three flags are '1' and either the BBNIVAL01 = '1' or BBNIVAL02 = '0'. The other three flags always should remain '1' but show where VAL01 = '1' or VAL02 = '0'. 

Sum({$<BBNIFLAG01 = {'1'}, BBNIFLAG02 = {'1'}, BBNIFLAG03 = {'1'}> + <BBNIVAL01 = {'1'}> + <BBNIVAL02 = {'0'}> }GWP)

I have tried the above set expression however it doesnt seem to work correctly? Any suggestions? Thanks

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Try this:

Sum({$<BBNIFLAG01 = {'1'}, BBNIFLAG02 = {'1'}, BBNIFLAG03 = {'1'},BBNIVAL01 = {'1'}>

+ <BBNIFLAG01 = {'1'}, BBNIFLAG02 = {'1'}, BBNIFLAG03 = {'1'},BBNIVAL02 = {'0'}>}GWP)

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

Try this:

Sum({$<BBNIFLAG01 = {'1'}, BBNIFLAG02 = {'1'}, BBNIFLAG03 = {'1'},BBNIVAL01 = {'1'}>

+ <BBNIFLAG01 = {'1'}, BBNIFLAG02 = {'1'}, BBNIFLAG03 = {'1'},BBNIVAL02 = {'0'}>}GWP)

QlikBeginner1
Creator
Creator
Author

Thanks @GaryGiles , works great!