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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
Community Champion
Community Champion

=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
Community Champion
Community Champion

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

thank you so much! 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.