Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a data model here,
[Table_A] is joined with [JOIN] table through Many :1
[Table_B] is joined with [JOIN] through Many:1 as well.
I want to display both the Table A and Table B in one cohesive table, however Power BI gives me an error and says there no relationships. I am thinking though there is a join table connecting them, but at the end of the day, this is a many to many relationship which is why Power BI cannot display the table.
I wanted a table like this.
From Table A | From Table B | |
ID | Name | Name_2 |
1 | Apple | Pie |
1 | Orange | Pie |
2 | Banana | Split |
3 | Strawberry | Dackery |
4 | Tomate | Sauce |
Is the error due to the many to many relationship? why can't PBI display this?
thanks!
Solved! Go to Solution.
Hi, @peterhui50
Please check the below picture and the sample pbix file's link down below.
I could not know whether you want a calculated column or a measure, so I created both.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
A most straightforward way is to merge the tables in PQ
let
Source = Table.NestedJoin(#"Table A", "ID", #"Table B", "ID", "TB"),
#"Expanded TB" = Table.ExpandTableColumn(Source, "TB", {"Name_2"}, {"Name_2"})
in
#"Expanded TB"
DAX formulae for calculated column and measure by leveraging relationships in the data model,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thank you! this is very helpful too. I just had though PBI would just let me drag in the column. I think I can use this as well. Thank you once again!
Hi, @peterhui50
Please check the below picture and the sample pbix file's link down below.
I could not know whether you want a calculated column or a measure, so I created both.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you! it works, but why can't Power BI just display the two columns simply by dragging and dropping? Is it because it is a many:many relationship?
Hi, @peterhui50
Thank you for your feedback.
I am not sure where I can create many to many relationship.
However, if you change the relationship like below, no need to create a measure, and you can just drag and drop.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
69 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |