Forum Discussion

Dragut's avatar
Dragut
Frequent Visitor
1 year ago

Cannot validate relationship for tables in direct query mode

I am asked to change the storage mode for certain tables from import to direct query mode. I have to delete them and rebuild from data sources with direct query. However, after rebuilding I encounter errors that power BI cannot validate the relationship. Morevoer, the visuals do not work any more. If I switch back to import mode, the relationship is validated fine and visuals are back working. Please help.

11 Replies

  • Hi Dragut 

    One of the reasons may be the Data Type of the Relationships.

     

    Go to Power Query ---> Select the columns used in relationships ---> Ensure they have the same Data Type in both tables.



    If this answers your questions, kindly accept it as a solution.
    If you found this helpfull then give kudos.

    • Dragut's avatar
      Dragut
      Frequent Visitor

      All of them are of text data type and I have made sure there is no null or missing values in them. But the relationship could not be validated and visuals don't work.

  • Dragut 

     

    Ensure Both Tables Use DirectQuery  Make sure that both tables in the relationship are in DirectQuery mode. Mixing Import and DirectQuery can cause validation issues.

    Validate Key Integrity Confirm that the join keys (especially on the “one” side) are unique and not transformed in a way that interferes with the relationship.

    Review Relationship Cardinality Double-check that the relationship’s cardinality (e.g., one-to-many) and direction are correctly set and supported by your data source.

    Avoid Unsupported Transformations: DirectQuery mode has limitations. Ensure that any calculated columns or transformations on the key columns are supported in DirectQuery.

    Data Source Capabilities Some data sources have restrictions on join operations. Verify that your data source supports the type of relationship you’re creating

     

    Thanks,
    Pankaj

    If this solution helps, please accept it and give a kudos, it would be greatly appreciated.

  • v-sdhruv's avatar
    v-sdhruv
    Icon for Community Support rankCommunity Support

    Hi Dragut ,
    I wanted to check if you had the opportunity to review the information provided by the users. . If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you

  • v-sdhruv's avatar
    v-sdhruv
    Icon for Community Support rankCommunity Support

    Hi @Dragut ,
    I wanted to check if you had the opportunity to review the information provided by the users. . If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you

  • v-sdhruv's avatar
    v-sdhruv
    Icon for Community Support rankCommunity Support

    Hi @Dragut ,
    I wanted to check if you had the opportunity to review the information provided by the users. . If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you

  • Dragut's avatar
    Dragut
    Frequent Visitor

    I reckon it's the meta data behind the scene in Power BI models that caused this issue.