Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello every one:
I need some help,I have following table
ProductID Price date
1 20 01/12/2013
1 30 01/12/2014
1 40 25/03/2015
2 10 01/01/2014
2 20 01/01/2015
I only want to load that productId,Price and date which are latest like
productID Price Date
1 40 25/03/2015
2 20 01/01/2015
Kindly help me out.
Thanks,
another one
xyz:
load * inline [
ProductID , Price , date
1 , 20 , 01/12/2013
1 , 30 , 01/12/2014
1 , 40 , 25/03/2015
2 , 10 , 01/01/2014
2 , 20, 01/01/2015
];
Right Keep (xyz)
LOAD
ProductID,
Max( date ) AS date
Resident
xyz
GROUP
BY ProductID;
LOAD
productID,
Only( Price ) AS Price,
Max( Date ) AS Date
FROM
PriceList.xlsx (ooxml .... )
GROUP
BY productID;
Front End
Create a Straight Table
Dimension
productID
Expressions
FirstSortedValue(SUM(Price),-Date)
FirstSortedValue(Date,-Date)
another one
xyz:
load * inline [
ProductID , Price , date
1 , 20 , 01/12/2013
1 , 30 , 01/12/2014
1 , 40 , 25/03/2015
2 , 10 , 01/01/2014
2 , 20, 01/01/2015
];
Right Keep (xyz)
LOAD
ProductID,
Max( date ) AS date
Resident
xyz
GROUP
BY ProductID;