Forum Discussion
Create Related Column from different table splited by field content
- 6 years ago
Hi. You can do this, but it wont' create the columns dynamically. You have to create each column in table 2. When you try to get values from a (*) Table to the (1) Table of the relationship, you have to consider that there are more than one row of tab 1 for each row in tab 2. That is why you must aggregate the values.
Assuming the tables have a relationship with "Material" column, you can try like this, adding new column in tab 2:
Forecast 1 = SUMX( FILTER( RELATEDTABLE(Tab1), Tab1[Snapshot] = 1 ), Tab1[Forecast] )It could also be resolved with calculate if you understand context transition.
Hope this helps,
Regards,
Hi. You can do this, but it wont' create the columns dynamically. You have to create each column in table 2. When you try to get values from a (*) Table to the (1) Table of the relationship, you have to consider that there are more than one row of tab 1 for each row in tab 2. That is why you must aggregate the values.
Assuming the tables have a relationship with "Material" column, you can try like this, adding new column in tab 2:
Forecast 1 =
SUMX(
FILTER(
RELATEDTABLE(Tab1),
Tab1[Snapshot] = 1
),
Tab1[Forecast]
)
It could also be resolved with calculate if you understand context transition.
Hope this helps,
Regards,
Thank you for your help! It is working fine 🙂