Discussion board where members can get started with QlikView.
I need help with aggregating my table:
From this table I need only the yellow lines with a minimum in "Diff_Date" in each product-Group. And if there are two min, like product A1, I need both lines.
How can i manage this in my script?
The same solution plus GROUP BY.
LOAD * Inline [
Date_1, Date_2, Diff_Date, Key_Product
01/01/2017, 01/01/2017, 1, Product B
02/01/2017, 02/01/2017, 7, Product B
03/01/2017, 03/01/2017, 0, Product A1
04/01/2017, 04/01/2017, 16, Product A1
05/01/2017, 05/01/2017, 0, Product A2
01/02/2017, 01/02/2017, 36, Product A2
02/02/2017, 02/02/2017, 2, Product C
03/02/2017, 03/02/2017, 0, Product A1
Min(Diff_Date) as Diff_Date,
Group by Key_Product;
View solution in original post
May be this
Right Join (Table)
Min(Diff_Date) as Diff_Date
Group By Key_Product;
Updated my response based on fvelascog72 comment who pointed out that i missed Group By statement
Where Diff_Date <= 1;
Thanks, but the smalles number could be any number. Only in the example it is 0 and 1.
Thanks! This works and I learnd something new!