Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Return rows based on multiple IF conditions

HI all,

 

My Projecttable looks like this

 

ProjectcodetypeCustomerExtra columns
A11Jillbla bla
A22Jillbla bla
A31Joebla bla
A42Joebla bla
A53Joebla bla

 

Now I want DAX to return all rows where

Type <> 1 AND Customer = "Jull" 

Or

Type <> 2 AND Customer = "Joe"

 

The output should look like this in a table visual

ProjectCodeType

Customer

A22Jill
A31Joe
A53Joe

 

I hope you can help me

  • Anonymous , add this measure along with other columns in a visual

     

    calculate(countrows(Table), filter(Table, (Table[Type] <> 1 && Table[Customer] = "Jull") || ( Table[Type] <> 2 && Table[Customer] = "Joe")))

1 Reply

  • Anonymous , add this measure along with other columns in a visual

     

    calculate(countrows(Table), filter(Table, (Table[Type] <> 1 && Table[Customer] = "Jull") || ( Table[Type] <> 2 && Table[Customer] = "Joe")))