Forum Discussion
Add a column from another table based on two criteria
- 3 years ago
Hi, Anonymous
Your sample data is too small to give me a clear understanding of your data model.
The RELATED function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. It doesn't support many-to-many relationship.
Please try functions like 'Sum',"Max","Average" to aggregate the results.
Column = CALCULATE(SUM('Dataset 2'[Hours]),FILTER('Dataset 2','Dataset 2'[Task ID]='Dataset 1'[Task ID]))Best Regards,
Community Support Team _ Eason
Hi Anonymous ,
which granularity has Dataset 2? Can you show me more rows as sample?
- Anonymous3 years agoNot applicable
Hi,
Thanks for your response. Dataset two includes another column called 'Site' which needs to be filtered in order for the hours to be displayed correctly.
- v-easonf-msft3 years ago
Community Support
Hi, Anonymous
Your sample data is too small to give me a clear understanding of your data model.
The RELATED function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. It doesn't support many-to-many relationship.
Please try functions like 'Sum',"Max","Average" to aggregate the results.
Column = CALCULATE(SUM('Dataset 2'[Hours]),FILTER('Dataset 2','Dataset 2'[Task ID]='Dataset 1'[Task ID]))Best Regards,
Community Support Team _ Eason