Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I would like to merge the following two calculated table:
Table 1: Year/month - team - team count - working days
Table 2: Year/month - team - days-off
I would like to bring the days-off data over to table 1 as an additional column. I tried using ADDCOLUMNS+ RELATED functions but is not working because i.) they have a many-to-many relationships and ii) they are calculated tables I can't merge them using PQ which would be ideal as the days-off result will depend on two variables the month/year and team.
How could anyone please help me to solve this issue?
Thank you in advance,
Salvador
Solved! Go to Solution.
Hi @sbenzaquen ,
To my knowledge, RELATED() works only for side 1 of the relationship.
Since the relationship in your data is Many to Many,it's suggested to use RELATEDTABLE() instead.
In addition, if the days-off is unique based on each YearMonth and Team, you could use LOOKUPVALUE() like this:
Dayoff = LOOKUPVALUE('Table2'[Days-off], 'Table2'[Year/Month],'Table1'[Year/Month],'Table2'[Team],'Table1'[Team])
If it does not make sense ,please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sbenzaquen ,
To my knowledge, RELATED() works only for side 1 of the relationship.
Since the relationship in your data is Many to Many,it's suggested to use RELATEDTABLE() instead.
In addition, if the days-off is unique based on each YearMonth and Team, you could use LOOKUPVALUE() like this:
Dayoff = LOOKUPVALUE('Table2'[Days-off], 'Table2'[Year/Month],'Table1'[Year/Month],'Table2'[Team],'Table1'[Team])
If it does not make sense ,please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @Anonymous .
Your solution was not working initially because I the same year/month multiple times for one team. But I fixed it using Summerize + Roll up function.
All working well now.
Thanks,
Salvador
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
55 | |
53 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |