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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.