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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Microsoft Employee
Microsoft 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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