Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

How can I solve this problem?

I have a request from one of my users to tell them how many customers have had a orders in 2017 and 2018, how many in just 2017 and how many in just 2018.  I have a table made up of Customer and Order Year.  Need something that would look like this

Offfice   With 2 years    just 2017     just 2018

xyz                  5                  2                  4

Thanks

2 Replies
Chanty4u
MVP
MVP

For  Current Year :

Sum({<year= {$(=max(Year))}>}Sales)

For Previous Year :

Sum({<Year= {$(= max(Year-1))}>}Sales)

tmumaw
Specialist II
Specialist II
Author

These are customer counts with 3 different buckets 1 for the number of customers who had order in 2017 and 2018, then another for just number of customers that had orders in 2017, then the last would be the number of customers who had orders only in 2018.