Forum Discussion
Comparing values from 2 tables, do not sum values
Hi,
I can't do a connectenate in the first table becuase I am connected to a dataset and I am not abled to go to the table where the data is.
When adding the same category of the other table I end up having 4 rows
Category Table 1 Costumer Total Table 1 Total Table 2 Category Table 2
A 1 $50 $50 B
A 1 $50 $100 A
B 1 $100 $100 B
B 1 $100 $50 A
And I only want to see
Category Costumer Total Table 1 Total Table 2
A 1 $50 $50
B 1 $100 $100
Hi Anonymous ,
Is there a field in your Table1 and Table2 that is in a many-to-many relationship? From this result, it seems that the many-to-many relationship caused the Cartesian product to appear in the result.
If there is a many-to-many relationship, you may need to optimize your data structure in advance, such as adding a bridge table or merging two tables into one table in advance through DAX or Power Query, because many-to-many relationships can cause many problems.
However, as Ashish_Mathur said, if you don't provide your sample data and the relationship model between your two tables, it is almost impossible for us to find the right solution. Please use sample data to replace the original data in your two tables and provide us with the relationship between the two tables. Thank you.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.