Skip to main content
Known Participant
June 26, 2024
Question

Double Wherecontains

  • June 26, 2024
  • 4 replies
  • 6 views

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
    June 26, 2024

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

    Known Participant
    June 26, 2024

    but should work in and condition

    Inspiring
    June 26, 2024

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