Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to connect a view from sql to powerbi?

I have two columns from two different databases. I tried joining, but it wasn't successful in powerbi. can anyone help me on this.

4 Replies

  • edhans's avatar
    edhans
    Icon for Community Champion rankCommunity Champion

    Can you show some screenshots of the issue you are having? Power Query within Power BI should have no issues joining tables/views from multiple database or multiple sources. A View to Power BI is treated as a Table. You don't need to do anything special because of it.

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Do you want to import the view in database?

    In fact it's impossible to achieve the idea in current version ( Version: 2.76.5678.782 64-bit (December 2019) ).

    Maybe you can submit your idea to power-bi-ideas .

    Currently, you can import original fact data tables from two databases separately and then merge the data in Edit Query or by DAX.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • edhans's avatar
      edhans
      Icon for Community Champion rankCommunity Champion

      v-lionel-msft can you clarify what you mean by not being able to import views? I routinely connect to views in SQL Server for both direct query and import query models in Power BI Desktop. This is not a new feature. Has been there since at least 2016.

      • v-lionel-msft's avatar
        v-lionel-msft
        Icon for Community Support rankCommunity Support

        Hi edhans  Anonymous ,

        Sorry, it's my fault. I tested it, it's OK to import views from a database.

        Back to your problem:

        "...I tried joining, but it wasn't successful in powerbi. "

        Do you want to import a view, or do you want to import two tables from different databases?

        And what problems do you encounter in the process?

        Please give us more information about the problems you have met.

         

        Best Regards,
        Lionel Chen