Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
mccook
Creator
Creator

Only Include Customers with Like for Like sales Current and Prior Year

Hi,

My data is kind of like below:

AreaCustomerProductSales 2020Sales 2021
NorthGrape IncEgg2,0006,000
NorthOrange OrgBacon04,500
SouthGrape IncSausage2,5000
EastBanana CoSausage7,0004,000
NorthApple IndBeans00

 

The issue I'm trying to solve in my chart/table using set analysis is  something like, if a customer has like for like sales (same area/customer/product) in 2020 and 2021, they are included and show a percentage of the total sales for 2021, so the results would be something like below (no need to show the column in blue):

AreaCustomerProductSales 2020Sales 2021Include%
NorthGrape IncEgg2,0006,000Yes60
NorthOrange OrgBacon04,500No-
SouthGrape IncSausage2,5000No-
EastBanana CoSausage7,0004,000Yes40
NorthApple IndBeans00No-

(so 2 customers are included as they purchased different products from us, but as they purchased the same product in 2020 and 2021 they are included)

I think I've been dancing around the solution (Aggr/Total/Intersection etc), any help/advice appreciated,

Thanks,

Dean

Labels (1)
0 Replies