Max() function on text list of values

Hello and thanks in advance for your helpfulness.

I keep getting the same error in the Expression Assistant when I try to use the max () function:
“The inputs for function ‘MAX’ should be a list of numeric values”.

What I need is to extract the max value from “Ft” column in the “Ric” table, only for this year 2021.

This is the expression:
MAX( SELECT( Ric[Ft], [Data1] = “2021” ) ).

"Ft" is a text column type and its records are invoice’s numbers sometimes followed by a dot and a letter. For instance: 1 , 1.A, 2, 3, 4, 5, 6, 7, 7.A , … 81, 82, 82.A, 82.B, 83, 84,

My goal is to set the intial value of Ft. by adding +1 to the last invoice number.

Up to now my workaround was this expression: [_thisrow] - 1
Where the first row is the header, but it has to be updated form time to time in order to ensure the correct result.

If I use the expression COUNT() it will count all the entries numeric and textual?
Is it possible to count only the numeric values in the “Ft” column ?

Or should I split the numeric part of “Ft” from the verbose one, in a new column of type numeric.
Then run the MAX () expression on this new column ? Can I do it with a Virtual column?

anyone, please?

If you need more info, please just ask.

Try this:

MAX(LIST(0) + SELECT(Ric[Ft], NOT(CONTAINS([Ft], "."))))
1 Like