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

Compare the current month values with previous and count the repeated Items

Below is my input table

Items, Month
1, Jan
2, Jan
7, Jan
3, Jan
8, Jan
3, Feb
4, Feb
5, Feb
1, Feb
2, Feb
7, Mar
5, Mar
10, Mar
9, Mar
2, Mar
6, Mar
1, Apr
8, Apr
3, Apr
7, Apr
9, Apr
1, May
5, May
48, May
50, May

o/p
jan, feb, mar, apr, may
0,     3,      2,      4,      3

Jan: As the output Jan has no previous months so it should show 0

Feb: We have values for Feb 1,2,3 and common with Jan, the count should show 3

Mar: We have values for Mar 2 which is common with Jan & Feb, count should show 2

Apr: We have values for Apr 1,3 which is common with Jan, Feb & Mar, so count shows 4

May: We have values for May 1 which is common with Jan, Feb & Apr, so the count shows 3

Thanks

Labels (1)
0 Replies