Arithmetic expression using Select()

Hi,

I’m trying to make a Valid_if function to restrict the maximum value from another table. I have the following formula:

MAX(SELECT(GLOSARIO INVENTARIO[Máximo], AND([_THISROW].[Frecuencia] = [Frecuencia], [_THISROW].[Punto de venta] = [Lugar], [_THISROW].[Momento] = [Momento])))

It says the formula is ok but it is not a expected Valid If condition. Any thoughts?

Solved Solved
0 7 730
1 ACCEPTED SOLUTION

@AlejandroCamacho
Valid_if needs to evaluate to a TRUE/FALSE value. You can maintain this simply:

[_THIS]<=MAX(SELECT(GLOSARIO INVENTARIO[Máximo], AND([_THISROW].[Frecuencia] = [Frecuencia], [_THISROW].[Punto de venta] = [Lugar], [_THISROW].[Momento] = [Momento])))

View solution in original post

7 REPLIES 7

@AlejandroCamacho
Valid_if needs to evaluate to a TRUE/FALSE value. You can maintain this simply:

[_THIS]<=MAX(SELECT(GLOSARIO INVENTARIO[Máximo], AND([_THISROW].[Frecuencia] = [Frecuencia], [_THISROW].[Punto de venta] = [Lugar], [_THISROW].[Momento] = [Momento])))

Perfect! Worked great, thanks guys!

@AlejandroCamacho
Can you please mark my reply as solution? It might be useful for other community members as well if and when they search the community posts with the solution tag. Thank you.

Done, sorry… didn’t knew there was a button for it. Thanks again!

@AlejandroCamacho
Not a big deal, but you had marked your own reply

Haha still so much to learn!

adambc
New Member

It looks like the Select function is expecting a select-row? for the second parameter but you are providing AND which returns Yes/NO

Top Labels in this Space