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
BARNESL
Regular Visitor

I am using a stored procedure that has a date parameter to retrieve data for a power bi report.

I am using a stored procedure that has a date parameter to retrieve data for a power bi report. I want the date parameter to default to today's date.

I can get the stored procedure to run if I type in a date such as 10/22/2021. But I want the date to default to the current date when the data is refreshed.

1 REPLY 1
BA_Pete
Super User
Super User

Hi @BARNESL ,

 

You may need to provide your code for this but, based on my initial interpretation, it looks ike this might be solved as follows:

 

If the SP is on SQL server and the date is hardcoded within it, you could find the hardcoded date and swap it for

CAST(GETDATE() AS DATE)

 

If only Power Query is providing the parameter, you could update the M code to provide the following instead of a user-entered/hardcoded date:

Date.From(DateTime.LocalNow())

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
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.

Top Kudoed Authors