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
Lovebo01
Helper I
Helper I

Refer another table in query editor

Hello, I have a table with some date :

 

Table Orders

ValueDate Order
2017-07-2017
1223-08-2020

 

I want to filter the date dynamically with another table where I have only one value :

 

Table StopDate

 

DateToStop
01-08-2017

 

So I want to change in the query editor :

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= #date(2017, 1, 8))

By something like :

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= #date('StopDate[DateToStop]))

 

How is it possible ?

 

Thank you for your help,

Lovebo,

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @Lovebo01 , the syntax is like this

 

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= StopDate[DateToStop]{0}))

or equally

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= StopDate{0}[DateToStop]))

 

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Hi, @Lovebo01 , the syntax is like this

 

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= StopDate[DateToStop]{0}))

or equally

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date Order] <= StopDate{0}[DateToStop]))

 

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thanks a lot, that's exactly what I expected !!

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.