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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to use a custom query as a filter in other tables

Hi, 

 

Im trying to filter all my tables based on a column in date_dim table. 

i.e filter all the rows of all tables greater than min date of the dim_date table. 

 

Im new to M query. Managed to genrate a blank query and wrote List.Min(dim_date[dim_date_key]) to get the min date. 

 

Im now struggling to use this query as a filter in the other tables. 

 

The following is the M code on the column which filtering using the results of Query. 

 

= Table.SelectRows(dbo_fact_booking, each [dim_booking_creation_dt_key] >= Query1)

 

Kindly suggest. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

You can add the step in the Second query, instead of as a separate query.

 

1. MinDate =List.Min(dim_date[dim_date_key]) ,

2. FileterTable = Table.SelectRows(dbo_fact_booking, each [dim_booking_creation_dt_key] >= MinDate)

 

 

Cheers

 

CheenuSing

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

You can add the step in the Second query, instead of as a separate query.

 

1. MinDate =List.Min(dim_date[dim_date_key]) ,

2. FileterTable = Table.SelectRows(dbo_fact_booking, each [dim_booking_creation_dt_key] >= MinDate)

 

 

Cheers

 

CheenuSing

Anonymous
Not applicable

@Anonymous 

 

It worked. Though my logic was incorrect. 

Thank you. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.