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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
MONA4980
Frequent Visitor

SQL to Power Query Translation

Hi everyody. I have an sql statement that I run on SQL Developer and it returns the results I want. 

I have the tables as direct query in Power BI. I have created the relationship, one ORDH to many DELV. However when I go to a visual I do not get the records I want. How would I translate this into Power Query?

 

select sum(o.charges),count(o.order_nbr)
from ordh o
inner join delv d on d.order_nbr = o.order_nbr
where d.status = 'D'
and d.status_DATE)= CURRENT_DATE

 

Also is there a way to reference the current_date in power query?

 

Thanks for any help.

3 ACCEPTED SOLUTIONS
Cookistador
Super User
Super User

If you want, you can also pass a query directly in Power BI

You just have to click on advanced options and paste your query

Cookistador_0-1746726997981.png

 

View solution in original post

MONA4980
Frequent Visitor

My SQL Editor is based on an Oracle database but does not reside in the database. I am not allowed to create or save views in the database. What would I choose as a data source? Do I save that query as text? I am sorry for what may seem like a silly question but I am extremely new to PowerBI and DAX

View solution in original post

MONA4980
Frequent Visitor

wow. that worked like a charm. thank you so very much. That is going to help a ton!

 

View solution in original post

4 REPLIES 4
MONA4980
Frequent Visitor

well shoot. It worked and shows in Desktop but when I publish it I get an error that I am disconnected. Is there something else I need to do?

MONA4980
Frequent Visitor

wow. that worked like a charm. thank you so very much. That is going to help a ton!

 

MONA4980
Frequent Visitor

My SQL Editor is based on an Oracle database but does not reside in the database. I am not allowed to create or save views in the database. What would I choose as a data source? Do I save that query as text? I am sorry for what may seem like a silly question but I am extremely new to PowerBI and DAX

Cookistador
Super User
Super User

If you want, you can also pass a query directly in Power BI

You just have to click on advanced options and paste your query

Cookistador_0-1746726997981.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.