Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Everyone.
Is it possible to filter in the source URL based on a column of document date:
something like - = OData.Feed("https://xxxxx.co.za/OData/ODatav4/Company('XXXX')/View?$filter = Posting date gt (now()-30)
I want to limit the time it takes to refresh my data, but saying just give me the last 30 days.
can anyone help?
Solved! Go to Solution.
Since the Date.ToText returns text, you don't need to wrap it in ". Please try this instead.
= OData.Feed("https://XXXX.co.za:/ODatav4/Company/ValueEntriesPage?$filter=Posting_Date gt " & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()),-65), "yyyy-MM-dd") , null, [Implementation="2.0"])
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mbarbera83
I doubt you can filter the Source URL before importing to power bi.
Solved: OData filter pass-through - Microsoft Power BI Community
For your requirement, I would suggestion you to use incremental refresh to set the refresh range to last 30 days.
Incremental refresh for datasets in Power BI - Power BI | Microsoft Docs
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hi Pat. Thanks for the quick response.
I tried that but received : Expression.SyntaxError: Token Comma expected.
I have attached below my code - am I missing something?
= OData.Feed("https://XXXX.co.za:/ODatav4/Company/ValueEntriesPage?$filter=Posting_Date gt " & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()),-65), "yyyy-MM-dd")") , null, [Implementation="2.0"])
Since the Date.ToText returns text, you don't need to wrap it in ". Please try this instead.
= OData.Feed("https://XXXX.co.za:/ODatav4/Company/ValueEntriesPage?$filter=Posting_Date gt " & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()),-65), "yyyy-MM-dd") , null, [Implementation="2.0"])
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can use this expression. Adapt the date format if you need something different.
OData.Feed("https://xxxxx.co.za/OData/ODatav4/Company('XXXX')/View?$filter= Posting date gt " & Date.ToText(Date.AddDays(Date.From(DateTime.LocalNow()), -30), "yyyy-MM-dd")")
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.