Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

Help on set expression with Different Scenarios .

Hi All ,

Need help on set expression with following scenarios .

1) How to Find Number of Customers who Did not Purchase any Item in Year 2015 ?

2) How to Find Number of Customers who Did not Purchase any Item in Year 2015 But have Done Purchase in Year 2016 ?

3) How to Find Customer who Purchased More Number of Items ?

4) How to Find Customer who Purchased More TYPES of Items ?

5) How to Find Number of Customers who have Purchased more than one type of Item in Year 2015 ?

6) How to show item least purchased ?

Also Find sample Attached .

Thanks & Regards

Shekar

1 Solution

Accepted Solutions
sunny_talwar

In a single set analysis... may be like this

=Count(DISTINCT {< Customer = {"=Count({<YearIS = {2015}>} Item) = 0 and Count({<YearIS = {2016}>} Item)>0"}>} Customer)

View solution in original post

19 Replies
shekhar_analyti
Specialist
Specialist
Author

Please help stalwar1

sunny_talwar

Look here at vinieme12‌ and my responses

Nested Set Analysis - Customer bought in both time periods

Specifically for your sample, it might be helpful for us to know what are the expected output for all of the question listed above...

or if someone else have free time... they might be able to give it a try

shekhar_analyti
Specialist
Specialist
Author

Thanks for reply .. I thought you have taken sabbatical or something ...

sunny_talwar

Will be available on and off

shekhar_analyti
Specialist
Specialist
Author

I got most of it .. I request if you can help me on this .


How to Find Number of Customers who Did not Purchase any Item in Year 2015 ?

vinieme12
Champion II
Champion II

like below

count({<Customer = {"=Count({<Year={2016}>} Item)=0"}>}Distinct Customer)

sunny_talwar

May be this if you don't have year field.... but recommed creating year field in the script.....

=Count(DISTINCT {<Customer = {"=Count({<Date = {""=Year(Only({<Date>} Date)) = 2015""}>}Item) = 0"}, Date>} Customer)

shekhar_analyti
Specialist
Specialist
Author

I am getting error for following
Number of Customers who Did not Purchase any Item in Year 2015 But have Done Purchase in Year 2016

shekhar_analyti
Specialist
Specialist
Author