about the relationship and data type in power bi

Nanthakumar S 30 Reputation points
2023-09-12T05:19:00.8533333+00:00

in power bi is this true, always ensure that both of the columns that you are using to participate in a relationship are sharing the same data type. Your model will never work if you try to build a relationship between two columns, where one column has a text data type and another column has an integer data type.

this statement is in optimize model performance - reduce relationship cardinality learning module

and in check your knowledge section,
Which of the following statements about relationships in Power BI Desktop is true?

1.Relationships can only be created between columns that contain the same data type.

2.Relationships can only be created between tables that contain the same number of rows.

3.Relationships can be created between tables that contain different types of data.

for this question the answer is 3.Relationships can be created between tables that contain different types of data.

which one is correct.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,257 questions
{count} votes

Accepted answer
  1. Nandan Hegde 34,171 Reputation points MVP
    2023-09-12T05:44:24.6033333+00:00

    Hey,

    <<old answer>> #1 is true.

    User's image

    #3 is true <<edited answer>>

    Basically based on the statement, Date and Text are different data types within powerbi and we can create relationship between 2 columns of text and date type respectively.

    So Relationships can be created between tables that contain different types of data. For any more queries on Powerbi, please post on :

    https://community.fabric.microsoft.com/t5/Microsoft-Power-BI-Community/ct-p/powerbi

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Daniela Tiparu 0 Reputation points
    2025-02-10T16:24:14.89+00:00

    User's image

    I think the explanation for which answer no 1 is false is not correct. How is it true that relationships can be created between columns that contain different data types in Power BI Desktop? I believe both answer 1 and answer 3 are correct.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.