Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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.
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")&
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |