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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors