“Relationships may be required,” although relationships are established

I have two simple tables in Excel 2010 - Products and Sales: enter image description here

Then I linked them to PowerPivot - and here a relationship was created from Sales.ProductId to Products.Id - like this:

enter image description here

Now I'm trying to create a Pivot, which for each product in the Sales table also shows me the category and PurchasePrice from ProductTable. However, here I am stuck - because the relationship is somehow wrong. When setting up Pivot, I get a message Relationship may be neededeven if the relationship already exists. The resulting table with the wrong calculation looks like this:enter image description here

although I'm actually trying to do this: enter image description here

, Sales PowerPivot RELATED DAX, , , , ...

.

+4
1

,

, , , , .

( Sales 1 ), Dropbox.

, 4 ( Excel 2010, 2013 ):

=SUM(Sales[SalesPrice])

=COUNT(Sales[ProductId])

=CALCULATE(SUM(Products[PurchasePrice]),Sales)

=[Purchase Price per Item] * [Product Sold]

- . , SUM CALCULATE ( ):

, , Sales ( ) .

, , , , :

enter image description here

+1

Source: https://habr.com/ru/post/1530784/


All Articles