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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jamjoom
New Member

Filtering column based on another table | power query

Hi All,

 

I have the following tables:

 

Employee

NameDate of Birth
Andrew5/13/1998
Michael9/3/1990

 

SalesByCity

CitySalesDate
Orlando2,000,0005/14/2001
Scottsdale6,000,0006/15/1980
Tampa1,000,0006/19/2005

 

And would love to have this table:

RESULT

CitySalesDate
Orlando2,000,0005/14/2001
Tampa1,000,0006/19/2005

 

The "Result" table was generated based on the max date from table "Employee". 

 

I can come up with the same result using this function: 

= Table.SelectRows(#"previous step", each [ValueDate] < #date(1998, 5, 13))

 

Is there a way to have this formula but not using date numbers; meaning, can I change this part "#date(1998, 5, 13))" to a formula that gives my result in the following way:

1) Check max date in Table "Employee"

2) Filter Table 2 to only show anything after the Max Date?

 

I hope this was clear enough. Thank you in advance.

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=let a=List.Max(Employee[Date of Birth]) in Table.SelectRows(PreviousStepName,each [ValueDate]>a)

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

=let a=List.Max(Employee[Date of Birth]) in Table.SelectRows(PreviousStepName,each [ValueDate]>a)

thank you so much! 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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