Forum Discussion

henrikbjerre5's avatar
henrikbjerre5
New Member
10 years ago
Solved

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

 

4 Replies

  • 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-power-bi-desktop

     

    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

    • henrikbjerre5's avatar
      henrikbjerre5
      New Member

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

      • sdjensen's avatar
        sdjensen
        Solution Sage

        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.