Skip to main content
Known Participant
Jun 26, 2024 8:05 AM UTC
Question

Double Wherecontains

I would need to run two wherecontains within this dictionary array, for example to get a country with a POPULATION greater than 1,000,000 and an AREA greater than 150.

how can I proceed with two wherecontains?

thanks

    4 replies

    Inspiring
    Jun 26, 2024 8:13 AM UTC

    index(
        local!data,
            intersection(
                where(local!data.POPULATION>1000000),
                where(local!data.AREA>150)
                ),
    null)

    Known Participant
    Jun 26, 2024 9:14 AM UTC

    but should work in and condition

    Inspiring
    Jun 26, 2024 9:25 AM UTC

    Yes the intersection function will return the common index which satisfies both population check and area check.