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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
danaleota1
Creator
Creator

Set analysis to only count a measure in between two values

Hello I am trying to do a count of calls that have a call duration greater than zero and less than or equal to 30.  so far I have

Count({<TV_SITE = {'Allen Park', 'Phoenix', 'St Petersburg'}, HTandTT ={"=sum(HTandTT)<=30"}, HTandTT ={"=sum(HTandTT)>0"} >} CALLID)

 

But it still counts the records with a zero for sum of HTandTT.  Any Suggestions on my syntax?  Thanks so much 

1 Solution

Accepted Solutions
danaleota1
Creator
Creator
Author

Hey Thanks Rod for your reply.

It is the same granularity so I removed the Sum aggregate function.  I was able to get the results using:

Count({<TV_SITE = {'Allen Park', 'Phoenix', 'St Petersburg'}, HTandTT={">0<=30"}>} CALLID)

 

 

View solution in original post

2 Replies
Rodj
Partner - Creator III
Partner - Creator III

This could be as simple as:

Count({<TV_SITE = {'Allen Park', 'Phoenix', 'St Petersburg'}, HTandTT = {"HTandTT<=30 >0"} >} CALLID)

but I'm not sure why you are doing the sum of HTandTT, it is at a different granularlity than your call ID? It sounds like it would be at the same granularity which is why I propose this solution. A good way to check your logic in this sort of scenario is to use your search term (<=30 >0 in this case) in the search box of the field. The set modifier is using the search syntax which is the same.

Cheers,

Rod

danaleota1
Creator
Creator
Author

Hey Thanks Rod for your reply.

It is the same granularity so I removed the Sum aggregate function.  I was able to get the results using:

Count({<TV_SITE = {'Allen Park', 'Phoenix', 'St Petersburg'}, HTandTT={">0<=30"}>} CALLID)