how to find a last column value

how to find a last column value …

Example

i have a column value [WPLABEL ]=WP001 …to WP088…

how to find last value (WP088) with expression?

any one please clarify

I can think of at least two scenarios.

  1. The last value in [WPLABEL] is always the last row created…

SELECT(table[WPLABEL], [_ROWNUMBER] = MAX(table[_ROWNUMBER])

  1. the latest value in [WPLABEL] is not always the very last row. And the values stick to the format WPnnn…n where n is a digit from 0 to 9 then, you first need to create a VC extracting the numeric value of [WPLABEL] with an expression like

NUMBER(RIGHT([WPLABEL], LEN([WPLABEL]) - 2))

or

NUMBER(SUBSTITUTE([WPLABEL], “WP”, “”))

in order to user MAX function because it only works on a list of numeric values.

Then you can utilize the new VC like

“WP” & MAX(table[new VC])

Hope this gives you some hints.

2 Likes
ANY(SORT(table[WPLABEL], true))
2 Likes

Wow!

Completely missed SORT.

1 Like