Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
How to find the max value based on receipt date...
I want to show only max receiptdate of max unit price
Regards,
Sub2u444
Hi,
did you tried this
Data:
LOAD
*
FROM DataSource;
LEFT JOIN(Data)
LOAD
PartNo,
max(Unit Price) as Unit Price,
1 AS MaxPriceFlag
RESIDENT Data
GROUP BY PartNo;
Now in front end use below expression for getting max date of the Part No.
Max({<MaxPriceFlag={1}>}ReceiptDate)
Hope this helps you.
Regards,
Jagan.
like this, PartNo as Dimension
Script is having just the loaded data you shared, expressions are shown in the image header -
Load * inline [
PartNo,RDate,UP
1,13-01-2016,30
1,20-02-2016,10
1,15-03-2016,40
2,10-02-2016,10
2,25-03-2016,40
2,15-05-2016,80
10,25-03-2015,40
10,22-04-2015,100
10,10-06-2015,200
10,01-08-2015,90 ];
Hi,
Check thsi
Data:
Load
PartNo,
Date(Date#(RDate, 'DD-MM-YYYY'), 'DD-MM-YYYY') AS RDate,UP
inline [
PartNo,RDate,UP
1,13-01-2016,30
1,20-02-2016,10
1,15-03-2016,40
2,10-02-2016,10
2,25-03-2016,40
2,15-05-2016,80
10,25-03-2015,40
10,22-04-2015,100
10,10-06-2015,200
10,01-08-2015,90 ];
LEFT JOIN(Data)
LOAD
PartNo,
Max(UP) AS UP,
1 AS MaxPriceFlag
RESIDENT Data
GROUP BY PartNo;
Next time don't attach screenshot of your data attach the sample data and let us know your required result. This way it is easier to try and provide you the solution.
Regards,
Jagan.
Hi Amarnath,
not getting the data..
@Sub2u444
Hi
If you got the answer close this thread by giving Correct & Helpful answers to the posts which helps you.
Regards,
Jagan.
Hi,
Thanks for the reply. i got the max date field now.
** i want to show the value of that max date.
EX:- 1 -> 15/03/2016 -> 2 value id's (20,40)
I need to show only 40 value.