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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

recalling date in Mquery

I have a table which has dynamic date value column  having only one value( AS_OF_DATE - 04/30/2020 ) this should be recalled and filter the data in another table.

 

What is the best approach to recall this value in another table in Mquery.

 

I have created a list for AS_OF_DATE and recalled in te Mquery ,however its not working as expected. 

 

Here is the sampple code:

 

#"Filtered Rows" = Table.SelectRows(#"Renamed Columns1", each ([PROCESS_DATE] = AS_OF_DATE))

2 REPLIES 2
edhans
Super User
Super User

Make sure the As_Of_Date is a scalar value, not a table.

Fastest way is to right-click on it and Drill Down. Make sure it is the proper data type - text, date, integer, whatever.

edhans_0-1598459800288.png

It will then look like this:

edhans_1-1598459822711.png

You can then use the above any place you would use a date. I call these variables and use them all of the time. They can be dynamically calulated on other data before being drilled down - min/max of a date column in another table for example, or today's date.

Note that you could call it by using different syntax if you left it in a table. As_Of_Date{0}[Column1] in your Table.SelectRows function, but that is a hassle. So unless you need to leave As_Of_Date as a table for other reasons, convert it and make all subsequent references easier to do.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Does it have to be a separate table versus could you code it into a function? Otherwise, I would just put a reference to the other query in this query and refer to it. @ImkeF @edhans 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors