Max() function on text list of values

St_Com
New Member

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.

0 3 980
3 REPLIES 3

St_Com
New Member

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?

St_Com
New Member

anyone, please?

If you need more info, please just ask.

Steve
Platinum 4
Platinum 4

Try this:

MAX(LIST(0) + SELECT(Ric[Ft], NOT(CONTAINS([Ft], "."))))
Top Labels in this Space