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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jobf
Helper II
Helper II

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 II
Helper II

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.