Forum Discussion

danielbacher's avatar
danielbacher
Frequent Visitor
2 years ago

Multiple criteria solutions?

Hi,
I have a task to filter around 250 rows of accounts. My solution would be to pass multiple criterias in a SWITCH( TRUE() statement. 
The problem here is that i have to pass a LOT of criterias, because i need to exclude a lot of accounts in between the ones i want to include. Does anyone know a better solution to this task?

2 Replies

  • smpa01's avatar
    smpa01
    Community Champion

    The alternative would be to use Joins.

     

    For example, to demonstrate filtering with switch in sql

     

    filtering with joins in sql

     

    You need to do the same thing in DAX by building a table that is representative of the SWITCH condition and usr that to filter fact table.

    • danielbacher's avatar
      danielbacher
      Frequent Visitor

      but wouldn't you need to make the individual criterias still? 
      The only different i would notice in DAX table is that i can use DAX to just click and choose instead of writing the statements. Is that what you mean?
      An example from my solution looks like this: