SOLVED

# Basic power Pivot question (why does the relationship "not work")

Frequent Contributor

# Basic power Pivot question (why does the relationship "not work")

I made a PowerPivot model and am wondering why PowerPivot cannot make an aggregation by dimension (row). This is a very basic question but it would help me a lot to understand how these models work if someone could give me a quick answer.

Here's the simplified version:

I have two tables, ItemVendor and tItemQties.

ItemVendor lists SKU's and their Supplier.

tItemQties lists SKU's and their quantities.

I added both tables to the PowerPivot model, and made a relationship between the SKU columns.

What I fail to understand is why, in a PowerPivot pivot table, the relationship "doesn't work":

All suppliers get the full total, instead of their own total.

My expected result would have been of course this (which I made in "standard" Excel, not PowerPivot):

Many thanks in advance for any clarification you can give!

5 Replies
best response confirmed by bartvana (Frequent Contributor)
Solution

# Re: Basic power Pivot question (why does the relationship "not work")

@bartvana Your model is a bad example since both tables contain unique SKU's. In reality the (fact) table with the Quantites holds non-unique SKUs whereas the (dimension) table with the SKU and Supplier info will hold the unique SKU's.

If you drag the relationship from the fact table (the many side) to the dimension table (the one-side) it shall work.

# Re: Basic power Pivot question (why does the relationship "not work")

That simple :). Fabulous, thank you!

# Re: Basic power Pivot question (why does the relationship "not work")

As variant, you may remove relationship at all and using such measure

``````Total QTY:=CALCULATE (
SUM ( tItemQties[Qty] ),
TREATAS (
VALUES ( ItemVendor[SKU] ),
tItemQties[SKU]
)
)``````

# Re: Basic power Pivot question (why does the relationship "not work")

Interesting, thank you!

# Re: Basic power Pivot question (why does the relationship "not work")

Above is only to illustrate other possibilities.  From performance point of view physical relationship is always preferable, if use virtual one when better TREATAS.