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! Go to Solution.
Have you tried packing the filters into one single condition?
MAXROW(
“CITIES”, “_ROWNUMBER”,
AND(
[CITY] = [_THISROW].[KAMPALA],
ISBLANK([VISITORS]),
ISBLANK([CHILDREN])
)
)
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
User | Count |
---|---|
41 | |
36 | |
28 | |
23 | |
16 |