Forum Discussion
Eliminate Many 2 Many Relationship
Anmolgan ,
I looked at it. The complete data model needs to re-looked. You need common dimension for the customer, dealer, Material, Geography, plant, and sales group.
One or more than one member can be there in each of these. My advice would be that get correct data from the source. Creating a dimension here is not a great idea.
Like Geography might start from city or store, depend on the common data point. Both tables seem to have a different column for material that needs to be addressed.
Hi amitchandak thanks for the response, basically I only need to create realtionship between customer key from both the tables, the problem is I dont have some keys in my plan query, but they exisist in actual, what will be the best way to eliminate them in such a way so that there is no issue when buiulding the relationship.
- v-lid-msft6 years agoCommunity Support
Hi Anmolgan ,
We can try to create a Dimension tables to connect two tables by using following code:
Dim Table = DISTINCT ( UNION ( DISTINCT ( 'TableA'[Column] ), DISTINCT ( 'TableB'[Column] ) ) )If you want to delete some rows to achieve a 1:M relationship, could you please share the logic of deleting rows or use some mockup sample data to explain it?
Please do not share files if it contain any confidential information or real data.
Best regards, - v-lid-msft6 years agoCommunity Support
Hi Anmolgan ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,