Forum Discussion
David_
4 years agoNew Member
Referencing a column based on values in another column
Hi, I'm trying to tell which column I want to look in table b based on values in a column in table a. The column in table A have 1, 2, 3, 4 in them and table B have columns named 1, 2, 3, 4
In excel id use something like index/match but i can't wrap my head around what to do in DAX.
Below you can see what I'm kinda trying to do.
Column =
var _var1 = 'Table_A'[Column_1]
var _var2 = "'Table_B'[" & _var1 & "]"
return
RELATED(_var2)
Hope someone has some good input. Thanks in advance!
Hope someone has some good input. Thanks in advance!
It dies not work this way with DAX. you need first to unpivot your table using power quert then you column names will become values in the Attributes column. Then filtering will be simple
3 Replies
- tamerj1
Community Champion
It dies not work this way with DAX. you need first to unpivot your table using power quert then you column names will become values in the Attributes column. Then filtering will be simple