Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator
Creator

Condition on group by (aggregate)

Region SalesID TRID
North 100 1001
South 100 1002
East 101 1003
West 102 1004
West 102 1005

 

I am trying to get here is the total  TRID for each sales id where count trid =2, here sale id 100 and 102  have count(trid) =2 , total trid =4.

I wrote something similar to this , but not working, Any help would be really appreciated.

Sum(Aggr( If(count(DISTINCT trid)=2,count(trid),0), saleid).

Labels (1)
1 Reply
starke_be-terna
Partner - Contributor III
Partner - Contributor III

Hi @jjustingkm!

I would try to solve this using Set Analysis and Advanced Search. Try this:
count({<SalesID={"=count(TRID)=2"}>} TRID)

Best regards
Benjamin