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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jobf
Helper I
Helper I

Oracle Database error with date condition.

The data for my Visual came from an Oracle Database. When writing the SQL, I tried to create a condition so that only data would come after a certain date. The problem is that it always gives an error. I tried to run the code in the database and it works fine, but for some reason in Power BI it gives an error. Does anyone have any idea why?
I tried using several date formats but none of them worked.
ErrorCode = -2147467259

jobf_0-1738779801081.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@jobf .I am glad to help you.

Usually errors that start with ORA mean that they are ORACLE related errors.

So this error occurs when sending a SQL query to the database, which I would think would be a problem with your M code syntax.

You can try converting the date type to text first, then select Change Type > Using Locale...
Check if the format does not correspond due to different regions.
Solved: error date column - Microsoft Fabric Community
 Or try changing your M code.
Solved: Re: ORA-01843: not a valid month - Microsoft Fabric Community
ORA-01843: not a valid month - IT Tutorial
How to Resolve the Not a Valid Month Error with Oracle TO_DATE- CodeProject


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
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
Anonymous
Not applicable

Hi,@jobf .Has your problem been solved?
If you have found suitable solutions, please share them as it will help more users with similar problems.
For example, relevant code or links to articles.
Or you can mark the valid suggestions provided by other users as solutions.
Thank you very much for your understanding and support of Power BI.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,@jobf .I am glad to help you.

Usually errors that start with ORA mean that they are ORACLE related errors.

So this error occurs when sending a SQL query to the database, which I would think would be a problem with your M code syntax.

You can try converting the date type to text first, then select Change Type > Using Locale...
Check if the format does not correspond due to different regions.
Solved: error date column - Microsoft Fabric Community
 Or try changing your M code.
Solved: Re: ORA-01843: not a valid month - Microsoft Fabric Community
ORA-01843: not a valid month - IT Tutorial
How to Resolve the Not a Valid Month Error with Oracle TO_DATE- CodeProject


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jobf
Helper I
Helper I

The data for my Visual came from an Oracle Database. When writing the SQL, I tried to create a condition so that only data would come after a certain date. The problem is that it always gives an error. I tried to run the code in the database and it works fine, but for some reason in Power BI it gives an error. Does anyone have any idea why?
I tried using several date formats but none of them worked.
Captura de tela 2025-02-05 152536.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors