Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Swathi
Creator
Creator

common customers between two years

i have period filter , if we  have selected Period=YTD, , need to common customers present  both current year YTD (from 01-01-2024 to 01-29-2024 ) -Previous Year YTD(from 01-01-2023 to 01-29-2023 ).

by default sheet is in YTD,  

i have used below formula, but it was giving 0,

Count(distinct {1<PYTD={1}, CYTD={1}, delv_qty={">0"}>} sold_to_desc).

when i take single either pytd or cytd , it is giving count of customers  of the year

Count(distinct {1<CYTD={1},delv_qty={">0"}>} sold_to_desc)

while taking  common customers in both years giving me 0,, but actualy have common customers please let me know how to resolve that

Labels (2)
1 Reply
Dataintellinalytics

Intersection.JPG

Separate the CYTD and PYTD, use P() along with intersection (*) operator.

Count( {<Sold_to_Desc = P({<CYTD={1},Delv_Qty={">0"}>})> * < Sold_to_Desc = P({<PYTD={1},Delv_Qty={">0"}>})> } distinct Sold_to_Desc)