Forum Discussion

smedina25's avatar
smedina25
New Member
10 years ago

Join 2 live query

Hi all

 

I'm new to Power BI so I'm little confused, I have 2 direct query connected to a SQL Server database, I have made a one to many relation on both queries, I need that when a user clicks on a item on one of the reports that connect ot the first quesry, the report that is linked to the second query gets refreshed too. I'm not sure if I have correctly explained. Thanks.

4 Replies

  • ankitpatira's avatar
    ankitpatira
    Community Champion

    smedina25 why don't you use single query instead of two queries. You can even get tables from two seperate databases under same query you don't need two different queries for that. Unless you can provide reason for using two different queries for same type of source (in your case sql server) I don't see a need to do that. Once your table are imported you can define relations between them (provided data is related) and filtering will work.

    • robert4m's avatar
      robert4m
      New Member

      ankitpatira

       

      CANNOT load tables from different databases using Direct Query

       

      When I try to load tables from different databases (same SQL Server) using Direct Query, it fails and asks me to switch to Import Mode for that query.

       

      The popup message is:

       

      "Switching to Import Mode

       

      The data source you are trying to connect to is different than the
      existing DirectQuery data source. To continue, all queries must be
      switched to Import mode, which may result in a large amount of data
      being loaded."

       

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    smedina25

     

    Your requirement is not quite clear for me. Maybe you're talking about the visual Slicer? Put any field from "one" table in the Slicer, selection in the Slicer would affect the data from both "many" and "one".

  • Anonymous's avatar
    Anonymous
    Not applicable

    hismedina25 ,

     

        I too believe what ankitpatira has said about using single query instead of two holds good as an optimised solution for near future. Further, Instead of linking & creating relationship in Power BI among two different database tables it would be more better if you do the same in SQL itself. 

     

    Regards