MINROW error

Hi,

This should be an easy one to answer but I’m having a real brain fail with it. I am trying to create a slice which returns the record with the lowest weight in a table. I am using following formula:

minrow(“Weights”, “Weight”) where Weights is the table name and “Weight” the column I want to filter by.

I get the following error message:

The expression is valid but its result type ‘Ref’ is not one of the expected types: Yes/No

What am I missing?

Thanks

Solved Solved
0 2 143
1 ACCEPTED SOLUTION

Please try the following filter expression

[Table’s Key Column Name]= MINROW(“Weights”, “Weight”)

MINROW(), MAXROW() return the reference , meaning key of the row with minimum or maximum of the selected criteria ( In this case “weight”)

Slice filter expressions need the expression to return “Y” or “N” ( True or False) depending on the required criteria to filter those rows. Hence the MINROW() result needs to be compared with all the table keys to select the desired key row with a “Y” or “N” result.

View solution in original post

2 REPLIES 2

Please try the following filter expression

[Table’s Key Column Name]= MINROW(“Weights”, “Weight”)

MINROW(), MAXROW() return the reference , meaning key of the row with minimum or maximum of the selected criteria ( In this case “weight”)

Slice filter expressions need the expression to return “Y” or “N” ( True or False) depending on the required criteria to filter those rows. Hence the MINROW() result needs to be compared with all the table keys to select the desired key row with a “Y” or “N” result.

That’s it!

Many Thanks and for clarifying the logic.

Top Labels in this Space