Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

Power BI Import VS Direct query relationship behavior

  • 1.  Power BI Import VS Direct query relationship behavior

    Bronze Contributor
    Posted 28 days ago
      |   view attached

    Hello,

    I have documented all the details with screenshots and attached the file. Please check it for more details.

    I have 2 tables, test1 and test2 as below

    CREATE TABLE TEST1

    (

    ID INT

    )

     

    CREATE TABLE TEST2

    (

    ID INT,

    NAME VARCHAR(10)

    )

     

    INSERT INTO TEST1(ID) VALUES(1),(2),(3),(4),(5),(6)

     

    INSERT INTO TEST2(ID,NAME) VALUES(1,'A'),(3,'C'),(4,'D')

     

    SELECT * FROM TEST1

     

    SELECT * FROM TEST2

    I brought this tables data into Power report using different data loading methods as below

    "Query1(Direct)" has data of table in Test1 using direct query model

    "Query2(Direct)" has data of table in Test2 using direct query model

    "Query1(Import)" has data of table in Test1 using import model

    Below is how these tables relationships were given in the model

     

    After this I started creating table visuals using data from these tables as below

    Scenario 1:

    When I bring "ID" filed from "Query1(Direct)" and "Name" field from "Query2(Direct)" below is the result

    This is behaving as expected and I see all the data.

    Scenario 2:

    When I bring "ID" filed from "Query1(Import)" and "Name" field from "Query2(Direct)" below is the result

    So, here data is not showing for ID's which are not present in "Query2(Direct)" table.

    Is there any reason behind this kind of behavior in Power BI?

    Thanks in advance 

     



    ------------------------------
    Anantha Battepati
    Consultant
    8985938783
    ------------------------------

    Attachment(s)

    docx
    Scenarios.docx   44K 1 version


  • 2.  RE: Power BI Import VS Direct query relationship behavior

    Top Contributor
    Posted 27 days ago
    Hi !

    Check the cross-filter direction in your data model. you can check this by clicking on [Manage Relationships] & see how these table are connected & how relationship is flowing from 1 table to other.

    Regards,

    ------------------------------
    Hasham Bin Niaz
    Director Data & Analytics
    Karachi, Pakistan
    ------------------------------



  • 3.  RE: Power BI Import VS Direct query relationship behavior

    Bronze Contributor
    Posted 26 days ago
    Edited by Anantha Battepati 22 days ago
      |   view attached
    Hi @Hasham Bin Niaz,

    Thanks for the reply,
    It's a 1-1 bi directional relationship. Attached the PBIX file for you reference.

    Regards,


    ------------------------------
    Anantha Battepati
    Consultant
    8985938783
    ------------------------------

    Attachment(s)

    pbix
    test2.pbix   36K 1 version