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: 
Not applicable

The smart way for boolean filter with Set Analysis

Is there a smarter way than this?
SUM({<DSS_DATE.IS_WEEKDAY={"-1"}     >} DSS_INVENTORY.OUT_OF_STK_STATE)
Like:
SUM({<DSS_DATE.IS_WEEKDAY={"=true()"}     >} DSS_INVENTORY.OUT_OF_STK_STATE)
3 Replies
swuehl
MVP
MVP

You need a dollar sign expansion with function calls inside the set expression, maybe like this:

SUM({<DSS_DATE.IS_WEEKDAY={'$(=true())'}     >} DSS_INVENTORY.OUT_OF_STK_STATE)

Stefan

Not applicable
Author

Hi uweh,

what about this:

SUM( if(DSS_DATE.IS_WEEKDAY, DSS_INVENTORY.OUT_OF_STK_STATE, 0))

Regards, Roland

Anonymous
Not applicable
Author

Agree with Roland that it is smarter without set analysis:

sum(DSS_INVENTORY.OUT_OF_STK_STATE * fabs(DSS_DATE.IS_WEEKDAY))

Regards,

Michael