Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
This issue has appeared previously ... and the suggested solution was to amend the SQL Statement ... which is what I had to do to get a worakaround for the problem.
I don't believe that this should be necessary, and I think there is a problem with how the the Native Query is being rendered when you apply a Filter in the Query Editor.
If you apply a Filter of Time.LocalNow() then the date at the time the Query is being generated is what gets passed to the Server. This works fine on the day that you write it. But once you publish to the Power BI Service and issue a Refresh on a Mobile the following day, they the query is still looking for the Data as of the day on which you generated the Query. The date needs to be dynamic ... and the code passed ... [DATE] = GETDATE() or equivalent. (I'm not a SQL person).
Here is the Power Query source code ...
let
Source = Sql.Database("sqlserver", "DemoDB"),
dbo_View_Budget_Visitors = Source{[Schema="dbo",Item="View_Bookings"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_View_Budget_Visitors, each [DATE] = DateTime.Date(DateTime.LocalNow() ) )
in
#"Filtered Rows"
This is how the Native Query is rendered ...
select [_].[DATE],
[_].[resourceName],
[_].[ADULT],
[_].[CHILD],
[_].[TOTAL]
from [dbo].[View_Bookings] as [_]
where [_].[DATE] = convert(datetime2, '2019-06-11 00:00:00') and [_].[DATE] is not null
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.