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: 
shwetagupta
Partner - Creator II
Partner - Creator II

If with Count and Sum

Hi Fellas,

I need to show a list of user visiting to a particular dealer when my visit count >3 and Qty Sold =0.

I am writing this in dimension: =If(Count({<status={'Active'}>}fe_ref_num)>3 and Sum(qty sold)=0, User)

Please suggest me how to show this and what is wrong with the condition stated above.

Thanks in advance

14 Replies
shwetagupta
Partner - Creator II
Partner - Creator II
Author

Not Working!

It is still showing users with count less than 3.

MK_QSL
MVP
MVP

Can you provide sample app or few lines of sample data?

sunny_talwar

Did this not work for you ( mrkachhiaimp‌‌'s suggestion above)

Count({<User = {"=SUM(qty)=0 and count({<status = {'Active'}>}[fe_ref_num])>3"}>}Distinct User)

shwetagupta
Partner - Creator II
Partner - Creator II
Author

I need to restrict dimension!

Though If I have used this to checkout the list of the user with count 1.

it is not restricting the user with qty=0 and visit count>3

sunny_talwar

Got it, how about this (as mentioned by antoniotiman‌)

=Aggr(If(Count({<status={'Active'}>}fe_ref_num) > 3 and Sum(qty sold) = 0, User), User)