Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data in source table as below
sample data for eg:
Form | ID | LastDate | NoEntries | Sum | Old |
HYT | 9054526 | 18/06/2007 00:00 | 1 | 988 | 02/11/2013 00:00 |
HYT | 9054527 | 18/04/2012 00:00 | 58 | 494 | 02/11/2013 00:00 |
HYT | 9054528 | 18/05/2012 00:00 | 1 | 0 | 02/11/2013 00:00 |
I need to show output in qvw as below
Form | ID | LastDate | NoEntries | Sum | Old |
HYT | 9054528 | 18/05/2012 00:00 | 1 | 0 | 02/11/2013 00:00 |
so, I need to show the rows which have latest 'LastDate'
Please can anyone suggest me how to do this.
Thanks.
If the LastDate field has no duplicate values, you may use the following expressions:
FirstSortedValue(ID,-LastDate)
FirstSortedValue(LastDate,-LastDate)
FirstSortedValue(NoEntries,-LastDate)
FirstSortedValue(Sum,-LastDate)
FirstSortedValue(Old,-LastDate)
You can use FirstSortedValue() function in the front end or the script to achieve this.
FirstSortedValue takes the following inputs: see attached image
thanks. when I am using this it is not showing for each case. Instead showing overall latest values.
but I want for each case
thanks. when I am using this it is not showing for each case. Instead showing overall latest values.
but I want for each case
Can you share a sample application?
Best,
Sunny
use max(lastdate)
Please see attached.
Does this looks like what you wanted? (PFA)
Best,
Sunny
Thanks.