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
kata
Frequent Visitor

Dynamic date filter in web content source

Hi All,

 

We are connecting to JIRA data, which is working fine with the following code:

 

 

kata_0-1688722445908.png

 

 

What I would like to reach is to have a dynamic date range, and have the data from the first day of the current year untill the current data.

 

I have tried to put after the "from" and after the "to" the following:

 

content=
"{



""from"": "&Date.ToText(Date.From( Date.StartOfYear(DateTime.Date(DateTime.FixedLocalNow()) )),"yyyy-MM-ddT00:00:00Z" )&",
""to"":"&Date.ToText(Date.From( Date.EndOfMonth(DateTime.Date(DateTime.LocalNow()) )),"yyyy-MM-ddT00:00:00Z")&"


}",

 

But unfortunately it did not work, and I am not too good at M code.

 

Can you please advise what should I do? 

Thanks in advance!

 

 

2 REPLIES 2
kata
Frequent Visitor

Dear @amitchandak ,

 

Thank you very much for the articles, I read them but honestly I do not understand still how I could implement in my exact example the dynamic date solution:(

 

Thank you again

amitchandak
Super User
Super User

@kata , refer if these can help

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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