First off
We are new to the PowerBI cmmunity, but PowerBI impresses us so far. Very nice product and we hope to contribute to the community in the future. We think we have encountered an issue and hope if you guys can help us out or if indeed it is a bug it could get registered and fixed.
Setup
We are using the Direct Query functionality on an Oracle database with the following Query where INSDATE is the insertdate of the record. The Enterprise Gateway connects the database to the online PowerBI environment. Within PowerBI desktop the report gets filled with all relevant records of the current day and using the publish gives the expected results also within the online environment.
let
Source = Oracle.Database("alias_adres", [HierarchicalNavigation=true]),
DBASE = Source{[Schema="DBASE"]}[Data],
UNIT1 = DBASE{[Name="UNIT"]}[Data],
#"Filtered Rows" = Table.SelectRows(UNIT1, each Date.IsInCurrentDay([INSDATE]))
in
#"Filtered Rows"
Issue
Whenever a day passes the report within the PowerBI online environment it still keeps showing the records of the day before and not for the current day as we would expect. Within the PowerBI Desktop environment, after a refresh we see the records we would expect from the currentday. So the functionality works allright there. A renewed upload of the .pbix file corrects the issues on the PowerBI online environment.
Suspected problem
Hence, we suspect that Date.IsInCurrentDay() function uses the uploadday of the .pbix file as reference to the current day and not the system/server/current as value for the query. This would be unwanted behaviour of the functionality for us as a daily manual upload seems to be a bit tedious and get in the way of us taking a holiday now and then.
Consideration
We are considering using a view on the table with the currentdate within the Oracle database layer to overcome this problem, hower, as Synonyms on the Oracle Database don't work with PowerBI, it might be highly possble that views won't work either. We will have some testing done next week with the datase admin to make sure if creating a view is a viable band-aid for the issue and will keep you update in this thread on that.
Questions to Microsoft/PowerBI Community
Is this a known issue?
Is this only an issue with Oracle databases?
Does anyone has other workarounds or solutions other than sugggested at our Considerations?
Or did we something obviously wrong in using the functionality and should we use something different?
Love to hear from you and hope you can help us out!
Thnx in advance,
Grazz.