Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
vesiletaskiran
Contributor III
Contributor III

Set analysis condition with count

I have 2 qvds. Ticket and Order. TICKET_ID is common in both vds. 

Ticket.qvd - >  TICKET_ID, TICKET_STATUS

Task.qvd-> TICKET_ID, ORDERID, ArriveTime(min), 

I need to calculate Tickets with more than 1 task having more than 30 mins TravelTime.

I dont want to join 2 models because of performance issues. 

Is it possible to make this with set analysis ? Something like below

count({$<TICKET_STATUS={"closed"}, Aggr(Count(TravelTime = {">30"},ORDERID)={">1"}>} TICKET_ID)

Thanks in advance. 

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps like this: count({<TICKET_ID={"=count({<TravelTime={">30"}>}ORDERID)>1"}>}TICKET_ID)

talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Perhaps like this: count({<TICKET_ID={"=count({<TravelTime={">30"}>}ORDERID)>1"}>}TICKET_ID)

talk is cheap, supply exceeds demand
vesiletaskiran
Contributor III
Contributor III
Author

Thanks a lottt. This works perfect