Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How To Exclude Rows Using Date Filter With Between Operator in Power Query

Hello Team,

This might be a simple for you experts, but I am stuck.

 

I have created a power query filter on  a date column.

=Table.SelectRows(#"PrevStep", each [Clearing Date] >= #date(2020, 2, 1) and [Clearing Date] <= #date(2020, 12, 31))

 

My requirement is not to keep these rows. Can anyone help me with this ?

 

Thank You in advance. 

  • One step away,

    = Table.SelectRows(#"PrevStep", each not ( [Clearing Date] >= #date(2020, 2, 1) and [Clearing Date] <= #date(2020, 12, 31)))

    or

    =Table.SelectRows(#"PrevStep", each [Clearing Date] < #date(2020, 2, 1) or [Clearing Date] > #date(2020, 12, 31))

2 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Icon for Community Champion rankCommunity Champion

    One step away,

    = Table.SelectRows(#"PrevStep", each not ( [Clearing Date] >= #date(2020, 2, 1) and [Clearing Date] <= #date(2020, 12, 31)))

    or

    =Table.SelectRows(#"PrevStep", each [Clearing Date] < #date(2020, 2, 1) or [Clearing Date] > #date(2020, 12, 31))