MAXROW() With multiple filter conditions

SHAR8F
New Member

Hello, I’m trying to refer to the last row based on several conditions instead of just one condition as the MAXROW() expression seems to allow.

My data looks something like this:

I need to get the last row (by row number) from table of Cities, where city is equal to _THISROW. [CITY] for example Kampala in this case, and [VISITORS] is blank, and [CHILDREN] is BLANK. i.e the formula should ignore rows, where the visitors and children columns are not blank.
In the above example the formula should return the highlited row where _THISROW.[CITY] = Kampala

I wrote this MAXROW() expression:

MAXROW(

“CITIES”, “_ROWNUMBER”,
(
[CITY] = [_THISROW].[KAMPALA],
ISBLANK([VISITORS]),
ISBLANK([CHILDREN])
)

)

Please help.

Thanks

Solved Solved
1 2 983
1 ACCEPTED SOLUTION

Have you tried packing the filters into one single condition?

MAXROW(

“CITIES”, “_ROWNUMBER”,

AND(
[CITY] = [_THISROW].[KAMPALA],
ISBLANK([VISITORS]),
ISBLANK([CHILDREN])
)

)

View solution in original post

2 REPLIES 2

Have you tried packing the filters into one single condition?

MAXROW(

“CITIES”, “_ROWNUMBER”,

AND(
[CITY] = [_THISROW].[KAMPALA],
ISBLANK([VISITORS]),
ISBLANK([CHILDREN])
)

)

This worked like a charm! Thank you so much @perissf

Top Labels in this Space