rolo
Member
Hello gurus!
WHAT I HAVE
I have a power pivot model with 3 tables:
1. Product (product key field with no duplicates)
2. Stock (product key field with no duplicates)
3. Sales (transactions table, many ocurrences of product key)
Then I have my relationships:
One to many relationship from Product to Sales Table (using ProductKey field)
One to many relationship from Stock to Sales Table (using ProductKey field)
WHAT I NEED
I need a pivot table to show stock by color. But when I do it I get this result:
Then I have tried 1 to 1 relationship but it is not possible.
Then I have tried adding a new "color" column in sales table, using this formula:
=related(Product[Color]), but when I build my pivot table with that new color field, I get same result (which repeats same stock for each color).
Is there any solution or any other DAX to be able to show stock by color?
I use Excel 2016 - download example here: https://dropfile.to/TJr79CP
Thanks!
FINAL NOTE
If I do the same using Power BI desktop I get the correct result, because it allows 1 to 1 relationship (Product[Color] to Stock[Stock]). But I need to use Excel 2016
WHAT I HAVE
I have a power pivot model with 3 tables:
1. Product (product key field with no duplicates)
2. Stock (product key field with no duplicates)
3. Sales (transactions table, many ocurrences of product key)
Then I have my relationships:
One to many relationship from Product to Sales Table (using ProductKey field)
One to many relationship from Stock to Sales Table (using ProductKey field)

WHAT I NEED
I need a pivot table to show stock by color. But when I do it I get this result:

Then I have tried 1 to 1 relationship but it is not possible.
Then I have tried adding a new "color" column in sales table, using this formula:
=related(Product[Color]), but when I build my pivot table with that new color field, I get same result (which repeats same stock for each color).
Is there any solution or any other DAX to be able to show stock by color?
I use Excel 2016 - download example here: https://dropfile.to/TJr79CP
Thanks!
FINAL NOTE
If I do the same using Power BI desktop I get the correct result, because it allows 1 to 1 relationship (Product[Color] to Stock[Stock]). But I need to use Excel 2016
Last edited: