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: 
m_woolf
Master II
Master II

write count(if with set analysis

I have this expression:

count(if(InDateTime<=[30 min] and OutDateTime>=[30 min],LineNo))

which is working fine, but is a little slow. I thought maybe it would be faster with set analysis. I have tried:

=count({<InDateTime={'<=[30 min]'}> * <OutDateTime={'>=[30 min]'}>}LineNo)

and

=count({<InDateTime={'<=[30 min]'},OutDateTime={'>=[30 min]'}>}LineNo)

but no joy.

 

1 Reply
Not applicable

count is a resource intensive function. You can use flags (set to 1 or 0) in the script to indicate if the LineNo is in a specific timebucket and then use those flags in your set analysis.