Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
So I want to filter data that is coming from OData feed by date, I want to pull just rows where date column value is in last 7 days. I create variable:
SevenDaysAgo = Date.AddDays(DateTime.LocalNow(),-7),
year = Number.ToText(Date.Year(SevenDaysAgo)),
month = if Date.Month(SevenDaysAgo)<10 then Text.Combine({"0",Number.ToText(Date.Month(SevenDaysAgo))}) else Number.ToText(Date.Month(SevenDaysAgo)),
day = if Date.Day(SevenDaysAgo)<10 then Text.Combine({"0",Number.ToText(Date.Day(SevenDaysAgo))}) else Number.ToText(Date.Day(SevenDaysAgo)),
dateText = Text.Combine({year,"-",month,"-",day,"Z"})
and then I am using this variable dateText in my OData query:
Source = OData.Feed("https://analytics.dev.azure.com/myOrgName/_odata/v3.0-preview/WorkItems?
$filter=Project/ProjectName eq 'ProjName'
&$select=SomeColumns
&$apply=filter((WorkItemType eq 'Bug' or WorkItemType eq 'Task')and Iteration/EndDate ge "& dateText &")&$expand=Iteration($select=IterationName,EndDate,Depth,StartDate))")
This works fine in Power BI Desktop, but when I publish report to PBI Service, I get error message "Query contains unsupported function. Function name: OData.Feed"
I googled a lot about this topic but I did not find any solution, so I hope that somebody have some solution for this problem?
Hi @NenadV ,
You could refer to this similar case:
Here is a blog for more details: