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: 
theaokii
Contributor III
Contributor III

Show a name if daily total amount greater than specify number

Hi everyone,

I have met a confuse about if function. There are 2 tables: 1 is my customer information, 1 is customers' order history.

I want a table show that customers who always order total bills' amount greater than 500 including total amout of each day. If in a random day that customer A order less than 500 although the other day's amount is greater than 500, his name wont be showed on table.

I have tried something as: if((count(if(aggr(sum(OrderAmount),Orderday,CustomerID))))=0, CustomerID). It works but cant excute for a big dataset. I dont have the right to edit in data load.

Could anyone give me an advise?

thank you guys so much?

Labels (1)
2 Replies
Rodj
Partner - Creator III
Partner - Creator III

Hi @theaokii ,

If I'm understanding what you want correctly this should work as your CustomerID dimension column:

           if(aggr(sum(OrderAmount),Orderday,CustomerID) > 500, CustomerID)
 
Also you can uncheck the "Include Null Values" option in the dimension properties to hid any random results.
 
Cheers,
Rod
theaokii
Contributor III
Contributor III
Author

Thank yo, Rodj,

I tried it firstly. And because of aggr orderday, the table shows customers have atleast 1 day order greater than 500.