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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.