Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to use the only() function along with aggr() and set analysis, but struggling to get it working.
I have some factory data along with audit dates and the company name that performed the audit.
I am trying to get the previous audit company name.
I have attached an example QVW with some very basic sample data.
Basically, the previous audit has the max 'CompletionDate', so its the 'CompanyName' that i want to get thats related to the max(CompletedDate), but its being displayed in a straight table, and the only() function is only returning the result for the max(CompletedDate) for the whole dataset, i need it to work row by row. It does work as expected when selections are made on the FactoryName.
This is the required output..
FactoryName | Date | CompanyName |
Factory1 | 08/06/2018 | CompanyA |
Factory2 | 27/12/2020 | CompanyC |
It could be that ONLY() is not the correct function to use.
Any help would be appreciated.
If I understand the question,
try with FirstSortedValue(PreviousCompany, -Date)