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 1,000
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