Forum Discussion

Dillard70's avatar
Dillard70
Regular Visitor
9 years ago
Solved

How to use two different fields in one filter

I would like to take two or more different fields and put them in one "advanced" filter with a "contains X or X".   For example, let's say I have a spreadsheet with 4 columns: unique name of a pers...
  • th3h0bb5's avatar
    9 years ago

    DAX has an OR function. Use that to create boolean answers to whatever question you want to answer.

     

    So for your example,  "I want to show anyone who owns a Chevy or Ford car, and/or a Harley bike, and/or takes the bus."

     

    you can create True/False statements as filters combining AND and OR statements. So something along these lines:

     

    (A = "Chevy" OR "Ford") OR (B = "Harley") OR (C = "Bus")

     

    As long as one of these things is true, the whole statement will return TRUE. If you want to see people who have a Chevy or Ford and drive the bus, just change an OR to an AND:

     

    (A = "Chevy" OR "Ford") AND (C = "Bus")