Forum Discussion
peterhui50
5 years agoHelper III
Relationship issue -- displaying a simple table
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...
- 5 years ago
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.
TableB Name Measure =IF (ISFILTERED ( 'Join'[ID] ),MAXX (TableA,LOOKUPVALUE ( TableB[Name_2], TableB[ID], RELATED ( 'Join'[ID] ) )))TableB Name CC =LOOKUPVALUE ( TableB[Name_2], TableB[ID], RELATED ( 'Join'[ID] ) )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
CNENFRNL
5 years agoCommunity Champion
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,
peterhui50
5 years agoHelper III
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!