March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Scenerio:
I have two tables
Table 1: ProductionCollection - It has product and collection amount. Product can repeat
Table 2: ProductSales - It has product and sales amount. Product can repeat.
Now I have to create a single visualization that can show product and Sales and collection amount side by side.
ProductCollection and ProductSales table cannot be connected because of repeated product values.
Solved! Go to Solution.
We cannot connect Table1: ProductSales and Table2: ProductCollection directly because of many to many relationship.
Created a bridge table Table3: Product - that has distinct value of product from both tables.
Table3: Product table creation
Product = DISTINCT(UNION(DISTINCT(ProductCollection[ProductName]), DISTINCT(ProductSales[ProductName])))
Product = DISTINCT(UNION(DISTINCT(ProductCollection[ProductName]), DISTINCT(ProductSales[ProductName])))
We cannot connect Table1: ProductSales and Table2: ProductCollection directly because of many to many relationship.
Created a bridge table Table3: Product - that has distinct value of product from both tables.
Table3: Product table creation
Product = DISTINCT(UNION(DISTINCT(ProductCollection[ProductName]), DISTINCT(ProductSales[ProductName])))
Product = DISTINCT(UNION(DISTINCT(ProductCollection[ProductName]), DISTINCT(ProductSales[ProductName])))
Hi @Rajiv1237,
What if we have one more column ProductType and it also has duplicate vlues and we want this column to filter both the tables and also the table product created by us.then how can we create a relationship.
I have a similar issue, just trying to make a bridge table out of 3 different tables. For some reason my outer DISTINCT doesn't seem to be able to remove duplicates of blank row:
List-Skill groups = DISTINCT(UNION(
VALUES(AXtimesheets[Skill Group (Category)]),
VALUES('FTE data lookup only'[Skill group]),
VALUES('Consolidated Allocations'[Skill group])))
So I get two blank values among all other normal names of skill groups.
Then another thing is that for the bridge table there shouldn't be no blanks at all. But to start with if I could find a way to keep only one blank, would be a good start. Any ideas?
Is there a difference between doing this in M in the Query Editor vs within DAX in the Modeling of the report?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
4 | |
4 | |
4 | |
4 | |
3 |