Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
EaglesTony
Post Prodigy
Post Prodigy

I need help with syntax of a filter

I have this, but not getting the results I want:

 

= Table.SelectRows(Issues_table, each ([StartDate] <> null and [DueDate] <> null))

 

What I need is

1) if StartDate is null, but DueDate is not null, I want these records

2) if DueDate is null, but StartDate is not null, I want these records

3) if StartDate is not null and DueDate is not null, I want these records

1 ACCEPTED SOLUTION

@EaglesTony 

Try this please: 

Table.SelectRows(Issues_table, each ([StartDate] <> null or [DueDate] <> null))



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@EaglesTony 

Not clear about your question, if you are looking for DAX Filter function, here you go: FILTER – DAX Guide

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks, but I'd rather do it in PowerQuery, since I want to filter my data first.

 

Here is an example of Data

 

Key      StartDate    DueDate

123      1/1/2025     null

456       null             2/1/2025

789       null             null

000       1/2/2025    1/15/2025

 

In this case I only want "123", "456" and "000"

@EaglesTony 

Try this please: 

Table.SelectRows(Issues_table, each ([StartDate] <> null or [DueDate] <> null))



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Work perfectly!..thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.