Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys, I need only the maximum dates for each Product in a table.
Like Bread 19/11/2017
Sugar 28/11/2017
Tea 18/11/2017
Tried something like this =Only({<PDate={'$(=max(Date))'}>} PDate) for Serial date 2. Didn't work.
Any kind of help is much appreciated and thanks in advance
Regards
Shahriar.
Seems to be 'PDate' is not properly formatted.
Try this.
Table:
LOAD Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate;
Load * inline
[
Product, PDate
Sugar, 11/11/2016
Bread, 12/11/2016
Sugar, 11/11/2017
Bread, 12/11/2017
Sugar, 12/10/2017
Bread, 12/10/2017
Sugar, 28/11/2017
Bread, 19/11/2017
Tea, 18/11/2017
];
Chart:
Dimension: Production
Expression : Max(PDate)
Can you share sample date?
What is the data present in PDate?
This is the test source data.
Table:
Load * inline
[
Product, PDate
Sugar, 11/11/2016
Bread, 12/11/2016
Sugar, 11/11/2017
Bread, 12/11/2017
Sugar, 12/10/2017
Bread, 12/10/2017
Sugar, 28/11/2017
Bread, 19/11/2017
Tea, 18/11/2017
];
Where is Date field from expression?
Only({<PDate={'$(=max(Date))'}>} PDate)
Try,
Only({<PDate={"$(=Date(max(PDate),'DD/MM/YYYY'))"}>} PDate)
Try below expression,
Dimensions is your product
Expression =Max(Total <Product> Date)
Thanks,
Vishal
Try below expression,
Dimensions is your product
Expression =Max(Total <Product> PDate)
Thanks,
Vishal
Seems to be 'PDate' is not properly formatted.
Try this.
Table:
LOAD Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate;
Load * inline
[
Product, PDate
Sugar, 11/11/2016
Bread, 12/11/2016
Sugar, 11/11/2017
Bread, 12/11/2017
Sugar, 12/10/2017
Bread, 12/10/2017
Sugar, 28/11/2017
Bread, 19/11/2017
Tea, 18/11/2017
];
Chart:
Dimension: Production
Expression : Max(PDate)
This doesn't work.
This only works when Load Product,Date(Date#(PDate,'DD/MM/YYYY')) as PDate; is added. Thanks.