Forum Discussion

febrina's avatar
febrina
New Member
4 years ago
Solved

Filter rows based on two columns

Hi,

I want to exclude my data based on two conditions.

1. Column [Name] = "Sarah"

2. Column [Date] = Less than 09/01/2021

 

Does anyone know how to make the filter? I have tried to add custom column, but it didn't work.

Thanks in advance

  • Hi, febrina 

     

    You can create a column and use it in filter pane to filter data.

    Like this:

    column =
    IF ( table[Name] = "Sarah" && table[Date] <= DATE ( 2021, 9, 1 ), 1, 0 )
    

    Did I answer your question? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.
     
    Best Regards,
    Community Support Team _ Janey

2 Replies

  • febrina , a new measures 

    calculate(sum(table[value]), filter(Table, not( Table[Name] = "Sarah" && Table [Date] <date(2021,09,01) ) ))

     

    Change order of month and day in date if needed

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, febrina 

     

    You can create a column and use it in filter pane to filter data.

    Like this:

    column =
    IF ( table[Name] = "Sarah" && table[Date] <= DATE ( 2021, 9, 1 ), 1, 0 )
    

    Did I answer your question? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.
     
    Best Regards,
    Community Support Team _ Janey