Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

SYSDATE from Oracle DB different in PowerBI

Hi,

 

The following SQL gives different answers when imported into PowerBI compared to running in a local Oracle server.  Obvisouly I am pointing the PowerBI data source at the same local database - but why is it different?

 

Power BI treats the week as Mon-Sun but my local server treats it as Sun-Sat. 

 

SELECT TO_NUMBER(TO_CHAR(SYSDATE,'D')) FROM DUAL

Please could someone explain why?

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Based on my research, in Oracle, you could use the NLS_TERRITORY parameter to set which day the week should start on. You can change it just for your session.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

In my test, this query returns the same answer in Oracle and Power BI desktop.

 

Result in Oracle                                                                                 Result in Power BI desktop

Result in Oracle.PNGResult in Power BI.PNG

 

Are you sure the Power BI desktop is hosted in the same server where installed Oracle server? What is your desktop version? 

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks fo the reply @v-yulgu-msft

 

When I run this in my Oracle server I get the following (for Thursday today):

Capture11.PNG

 

 

 

 

Could it be a setting on my Oracle server end defaulting to Monday as start date for week?

 

Thanks,

Ben

Hi @Anonymous,

 

Based on my research, in Oracle, you could use the NLS_TERRITORY parameter to set which day the week should start on. You can change it just for your session.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.