Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody,
Guys i am stuck in one condition which.
Max Order date With respect to product.
Data :
Prod Date Sales
a 10 Jan 2015 4pm , 100
a 15 Jan 2015 5pm , 200
b 10 Jan 2015 6pm , 300
b 10 Jan 2015 8pm, 300
c 15 jan 2015 8pm , 300
c 15 Jan 2015 6pm, 400
a 21 feb 2015 8pm, 600
a 21 feb 2015 2pm, 300
c 22 feb 2015 6pm. 400
c 26 Feb 2015 9pm,300
o/p :
Prod : a,b,c
Sales : .....
Date:....
coding in backend only
How you want to show?
output :
a max date and time
a max date and time
a max date and time
b ...
b ,,,
c ...
c ...
Like this?
LOAD Prod, Date(Max(Dates),'DD-MMM-YYYY hTT') as Dates Group By Prod;
LOAD Prod, Date(Date#(Dates,'DD MMM YYYY hTT'),'DD-MMM-YYYY hTT') as Dates, Sales Inline [
Prod, Dates, Sales
a , 10 Jan 2015 4pm , 100
a , 15 Jan 2015 5pm , 200
b , 10 Jan 2015 6pm , 300
b , 10 Jan 2015 8pm, 300
c , 15 jan 2015 8pm , 300
c , 15 Jan 2015 6pm, 400
a , 21 feb 2015 8pm, 600
a , 21 feb 2015 2pm, 300
c , 22 feb 2015 6pm, 400
c , 26 Feb 2015 9pm,300
];
Done , But i want result must be per date max date,
If possible then please reply
Always you are replying in short description only. Will you able to explain the output?
On the example given, what should be the result?