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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AaronClements
Frequent Visitor

Dynamic SQL queries that update date parameters

Hello,

 

Apologies for what may be a very basic question, but I haven't been able to find an answer on this.

 

I'm working with several lookup tables that run on SQL queries. I would like to refresh these source queries for the most recent day without having to manually set the parameters on each one to pull data for the given date range. 

 

Additionally, is there a way to append query results as additional rows in the table without having to re-run the entire query? That way I can simply pull the most recent results for that day.

2 REPLIES 2
v-cherch-msft
Employee
Employee

Hi @AaronClements 

 

It seems you may use parameters in your query like this post.Then create a new append query to append these new tables.For further,please refer to below article.

https://biinsight.com/power-bi-desktop-query-parameters-part2-dynamic-data-masking-and-query-paramet...

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply, @v-cherch-msft. I checked that thread, but I still was unable to find a way to dynamically update strings of SQL text to adjust my query. Would I be able to do that with the solution in that thread?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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