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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
henrikbjerre5
New Member

SQL-statements from Excel into Power BI

Hi all

 

I'm new to Power BI and have a question regarding SQL-statements.

 

In our organisation we have an Excel spreadsheet with a Pivot-table, that connects to a database. I'm not an expert in SQL, but I just want the same data that I get into my Excel spreadsheet into Power BI instead, so I can visualize my data.

 

To eamplify, I have attached the connection properties here. It's these data I want in Power BI.

 

Anybody that knows if this is possible? And anybody that can help?

 

Thank you very much in advance.

 

Best regards Henrik

 

Capture.PNG

1 ACCEPTED SOLUTION
sdjensen
Solution Sage
Solution Sage

Hi,

 

It is possible to get data from a SQL database into Power BI Desktop - if you later want to upload your model to the Power BI Service you will need to setup a gateway to enable data refresh.

 

Perhaps this video can help you: https://powerbi.microsoft.com/en-us/guided-learning/powerbi-learning-1-2-connect-to-data-sources-in-...

 

Basically what you need to do is:

1. Open Power BI Desktop and select Get Data

2. Select SQL Server as you source

3. Connect to the SQL Server / Database

4. Copy/Paste your select statement from Excel

5. Load the data into your model

/sdjensen

View solution in original post

4 REPLIES 4
sdjensen
Solution Sage
Solution Sage

Hi,

 

It is possible to get data from a SQL database into Power BI Desktop - if you later want to upload your model to the Power BI Service you will need to setup a gateway to enable data refresh.

 

Perhaps this video can help you: https://powerbi.microsoft.com/en-us/guided-learning/powerbi-learning-1-2-connect-to-data-sources-in-...

 

Basically what you need to do is:

1. Open Power BI Desktop and select Get Data

2. Select SQL Server as you source

3. Connect to the SQL Server / Database

4. Copy/Paste your select statement from Excel

5. Load the data into your model

/sdjensen

Can I do it in the online version or is it only the desktop version that allows it?

As far as I know you need to build the model in the Power BI Desktop to get data from an on-premise SQL server.

 

If you ask me I the Power BI Desktop is a much better tool for development.

/sdjensen

Ok - thank you very much. I'm still waiting for Power BI desktop to be accepted in my organisation. That's why I'm asking.

 

Looking forward to try it.

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.