In R I can write
neighbours<-c("Merton",
"Southwark","Sutton","Wandsworth",
"Bromley")
And then filter a dataframe like
df %>% filter(neighbours %in% boroughs_of_london)
And it can get even more complex if you follow something like this:
Multiple strings with str_detect R
The question I have, as tidyverse dplyr is very much like SQL which is like DAX (right?), is
Can I and how do I filter by a vector/variable in DAX?
EDIT: In DAX you'd probably write
FILTER (
LONDON,
LONDON[boroughs_of_london]
IN { "Merton", "Southwark", "Sutton", "Wandsworth", "Bromley" }
)
Is this correct?
FILTER (
LONDON,
LONDON[boroughs_of_london] IN { neighbours }
)