Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Find intersection between previous values

Hi Friends,

I have one situation ,

I have below data for Month and ID

   

MonthIDRequired_Output
Dec-153 null
Jan-163 null
Feb-1633
Mar-164null
Apr-164null
May-1644

Now i want each row should  compare its previous 3 rows and find intersection value , i have placed required output in one column.

Example : For Feb-2016  , it will compare Dec-2015,Jan-2016 and Feb-2016 any ID: 3 is common in between , so 3 should return in front of Feb-2016 , else null

11 Replies
vinieme12
Champion III
Champion III

Attached updated App

SUM(AGGR(IF(ID = rangesum(Above(ID,0,3))/3 , ID,null()),Month))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
agni_gold
Specialist III
Specialist III
Author

Thanks ,

Little bit change in requirement ,

MonthIDRequired_Output
Dec-153,2,1null
Jan-163,4,8null
Feb-162,33
Mar-169,2,4null
Apr-166,1,5  null
May-166,5null
Jun-166,5,4null
Jul-165,45

to find common between strings type structure.