Get last row of DataTable

Hello everyone,

I’m having a datatable like this:

Column A Column B Column C
marc male m
Ellen female v
Bart male m

I want to get the last row of my datatable into a new datatable. So that my new datatable gives:
Column A Column B Column C
Bart male m

How can i do this?

1 Like

Hello hansgeeroms,

use value = Dt.count

it gives exact count of table and read last row based on value -1

1 Like

@hansgeeroms Try this query

new_DT = DT_input.asenumerable.reverse().take(1).copytodatatable

2 Likes

Thanks!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.