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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Refresh data of an underlying query based on a parameter or slicer filter

Hi,

I have built a Power BI app that looks at a single weeks performance and have created @StartDate parameter for the first day of the week.  The SQL query is fairly complex with several temp tables.  I then used the query to build the dataset which runs the app. It automatically runs the current week without the users having to do anything. They like it but now want to select previous weeks.  I can build a slicer filter with the StartDate weeks but what I need to do is to find a way to pass the StartDate to the underlying query and have it rerun the data.  The query is too complex to simply run multiple weeks and then filter on one week of results.  Is there a way to create a parameter that when clicked on will rerun the underlying query with a previous weeks results?

Thanks

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

 

I'm afraid there is no direct option on a visual to meet your requirement.

However, here is a workaround you can take into consideration.

Create a history table which contains previous weeks results, then pass parameter in this table.

In the query editor, first copy the dataset, then in this copied dataset, you can right click on a query to select or deselect the option "Include In Report Refresh" and "Enable Load".

Then create a “history table” that store the history data, uncheck “"Include in Report Refresh" option so to disable the refresh to this table. You can refer to this article to achieve your goal better.

 

Best Regards

Maggie

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