Forum Discussion
Unusual Behavior for Dates
I have unsual behavior involving dates. I have made a slicer based on date, it's working perfectly fine in Power BI Desktop:
But once I uploaded it on the Power BI Service, The dates are ruined
It came to a point that I accedentally visitied the year 1899 and I can no longer get out of it as the slicer is disabled:
I have a SAP HANA data source in direct query in which it gets data from for those dates.
6 Replies
- v-huizhn-msftMicrosoft Employee
Hi Anonymous,
I am unable to reproduce your scenario, whether or not this issue always happens for other data resource? You create a simple date table by "Enter Data" under Power BI desktop home page, then publish it to service for test.
Thanks,
Angelia- AnonymousNot applicable
Hello Angelia!
Thanks a lot for taking a look into this, I was unable to replicate this to other data source. Curiously, I don't have problems when I am using the Import option from SAP HANA. This happens when I am using DirectQuery on SAP HANA with SQL Statement and I was using some date functions being used in the SQL query to convert the data (initially it's not in date format, in whole number but I need to convert it to date) :
Everything is working fine in Desktop.
Sample: select to_timestamp(to_timestamp(<column with whole number data type>), 'YYYY-MM-DD HH24:MI:SS.FF7') from <view>
In Power BI Service, it's not working anymore:
- v-huizhn-msftMicrosoft Employee
Hi Anonymous,
Please right click the "Query Edit", and see if there is "Canged Type".
In addition, connect directly to the SAP HAHA data source using DirectQuery, which may caused the error.
Thanks,
Angelia