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
Srividyak
New Member

Need to Pass dynamic date as parameters to Web URL.

Hello Community,

 

If we are fetching the report in between a month we need to get the report data up to previous month last date.

 

Example: if we are trying to get report data at Feb 10th, we need get the report data upto january 31.

Effective date we need to pass it as dynamic.
https://xxxxxxxxxxxx.com/ccx/service/&Effective_as_of_Date=2022-01-12-&format=csv.

 

Your help is appreciated.

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Srividyak 

 

Do you fetch data from a web service with the URL? If so, you could open Power Query Editor, select this query and open its Advanced Editor. Find your static URL string and replace the static date "2022-01-12" with &DateTime.ToText(Date.AddDays(Date.StartOfMonth(DateTime.LocalNow()),-1),"yyyy-MM-dd")&vjingzhang_0-1644463475665.png

 

Below is an example:

Web.Contents("https://xxxxxxxxxxxx.com/ccx/service/&Effective_as_of_Date="&DateTime.ToText(Date.AddDays(Date.StartOfMonth(DateTime.LocalNow()),-1),"yyyy-MM-dd")&"-&format=csv")

 

Here are documentations for Date and DateTime functions in Power Query.

Date functions - PowerQuery M | Microsoft Docs

DateTime functions - PowerQuery M | Microsoft Docs

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

freginier
Super User
Super User

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.