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

Solved Solved
0 3 87
1 ACCEPTED SOLUTION

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]) 

2) 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.

View solution in original post

3 REPLIES 3

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]) 

2) 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.

Steve
Platinum 4
Platinum 4
ANY(SORT(table[WPLABEL], true))

Wow!

Completely missed SORT.

 

 

 

Top Labels in this Space