Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write an expression that combines the ability to find the 2nd maximum actiondate and then give the sum of measurement value from this record.
Max([Measurement actionDate],2)
SUM(Measurement measurementValue)
I can obtain the 2nd max date without any issues using the first part of the expression but cannot sum on that record.
Any ideas please?
Thanks,
Managed to work it out in the end through Set Analysis if anyone is interested.
({<[Measurement actionDate]={'$(=max([Measurement actionDate],2))'}>} [Measurement measurementValue])
Try this Code:
AAA:
LOAD ID,
Date(Max(Date,2),'DD/MM/YYYY') AS [Max Measurement actionDate]
From
Sample1111.qvd
(qvd) Group By ID;
Left Join
LOAD
Date(Date,'DD/MM/YYYY') AS [Max Measurement actionDate],
[Measurement measurementValue]
FROM
Sample1111.qvd
(qvd);
See the Attachment
Regards
Aviral Nag