Expression help: Check multiple columns using Select and Contains

Hi All,

My expression checks if column “Angelfish Blanks” contains the value “1”:

SELECT(Student Dinners[Class], CONTAINS([Angelfish Blanks], “1”,),([Class] = [_THISROW].[Class]))

How would I add two further Columns to the CONTAINS part of the expression? I need to add “Dolphin Blanks” and “Pufferfish Blanks” columns.

Thanks, J.

Is this?

SELECT(Student Dinners[Class],
AND(
CONTAINS([Angelfish Blanks], “1”,),
CONTAINS([Dolphin Blanks], “1”,),
CONTAINS([Pufferfish Blanks], “1”,),
[Class] = [_THISROW].[Class]
)
)

Depending on your case and how you want to filter out the row, you change AND expression onto OR,

or you combine AND/OR expression all together.

3 Likes

Thats great, Thanks!

Your are welcome.