Filter out last record

Hi there, i have created a slicer and in the ‘Row filter condition’ I want to filter only the last record.
The following formula seemed to be right to me, but it doesn’t work:

NUMBER(maxrow(“Klantgegevens”, “_ROWNUMBER”)) = NUMBER([_ROWNUMBER])

Does anyone have a better suggestion for me to use?

MAXROW returns the key value of the record. Your expression would only work if _RowNumber was the key column for your Table, which is usually a bad thing to do so I hope you’re not doing it. Here’s a more general expression that should work.

[_THISROW] = MAXROW( "table" , "_RowNumber" )

Better still would be to replace the _rownumber with a record creation datetime, but that would require you to have recorded that value in your records.

4 Likes

thanks, that was a great help!
rowNumber is not the key column of my table, so probably that’s why it wasn’t working. I used your expression and it works!

1 Like