Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello. I need a line of M Code that will NOT filter the following [VOIDSTTS] of 0; [VOIDSTTS] of 1 where [VOIDDATE] > AsOfDate.
Right now, the AsOfDate is 9/6/2025. Here are what the two columns look like and the third column is what result I am after:
| [VOIDSTTS] | [VOIDDATE] | KEEP OR FILTER OUT? |
| 0 | 1/1/1900 | KEEP |
| 0 | 1/1/1900 | KEEP |
| 1 | 7/7/2025 | FILTER OUT |
| 1 | 10/1/2025 | KEEP |
| 0 | 1/1/1900 | KEEP |
| 1 | 8/4/2024 | FILTER OUT |
| 0 | 1/1/1900 | KEEP |
| 0 | 1/1/1900 | KEEP |
| 1 | 9/7/2025 | KEEP |
Solved! Go to Solution.
If [VOIDSTTS] are of Text data type, and [VOIDDATE] are Date, you can do this by adding a step in M,
Table.SelectRows(#"laststep",
each
[VOIDSTTS] = "0" or ([VOIDSTTS] = "1" and [VOIDDATE] > #date(2025, 9, 6))
)
@rmcgrath Try the following:
Table.SelectRows(#"Changed Type", each ([#"[VOIDSTTS]"] = 0 or [#"[VOIDDATE]"] > #date(2025, 9, 6) ))
If [VOIDSTTS] are of Text data type, and [VOIDDATE] are Date, you can do this by adding a step in M,
Table.SelectRows(#"laststep",
each
[VOIDSTTS] = "0" or ([VOIDSTTS] = "1" and [VOIDDATE] > #date(2025, 9, 6))
)
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |