In Power Pivot I have imported 2 simple (excel) table (see below).
In each table I created (within Power Pivot) a calculated column "Link" to provide a unique key.
Theses links are used in a relationship
Price Table
The Link Column is a calculated field ie CONCATENATE(Product Code,Country)
[TABLE="width: 0"]
<tbody>[TR]
[TD]Product Code[/TD]
[TD]Price[/TD]
[TD]Discount[/TD]
[TD]Country[/TD]
[TD]Link[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]$10.34[/TD]
[TD]$9.31[/TD]
[TD]AU[/TD]
[TD]A1AU[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]$12.76[/TD]
[TD]$11.48[/TD]
[TD]AU[/TD]
[TD]A2AU[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]$18.79[/TD]
[TD]$16.91[/TD]
[TD]AU[/TD]
[TD]A3AU[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]$6.98[/TD]
[TD]$6.28[/TD]
[TD]AU[/TD]
[TD]B1AU[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]$5.43[/TD]
[TD]$4.89[/TD]
[TD]AU[/TD]
[TD]B2AU[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]$8.34[/TD]
[TD]$7.51[/TD]
[TD]AU[/TD]
[TD]B3AU[/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]$7.83[/TD]
[TD]$7.05[/TD]
[TD]AU[/TD]
[TD]B4AU[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]$11.06[/TD]
[TD]$9.96[/TD]
[TD]NZ[/TD]
[TD]A1NZ[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]$13.65[/TD]
[TD]$12.29[/TD]
[TD]NZ[/TD]
[TD]A2NZ[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]$20.11[/TD]
[TD]$18.09[/TD]
[TD]NZ[/TD]
[TD]A3NZ[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]$7.47[/TD]
[TD]$6.72[/TD]
[TD]NZ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TD]
[TD][/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]7[/TD]
[TD]AU[/TD]
[TD]B4AU[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Next I created a relationship for the 2 “Link” columns. Sorry I cannot paste the screenshot
I now want to use the relationship. The Value column in the Sales table is a simple calculated field ie =[Qty]*Price[Price] which should produce the “Value” of the sale. But I get the following error in every row
"The value for column 'Price' in table 'Price' cannot be determined in the current context. Check that all columns referenced in the calculation expression exist, and that there are no circular dependencies. This can also occur when the formula for a measure refers directly to a column without performing any aggregation--such as sum, average, or count--on that column. The column does not have a single value; it has many values, one for each row of the table, and no row has been specified."
What am I doing wrong!
In each table I created (within Power Pivot) a calculated column "Link" to provide a unique key.
Theses links are used in a relationship
Price Table
The Link Column is a calculated field ie CONCATENATE(Product Code,Country)
[TABLE="width: 0"]
<tbody>[TR]
[TD]Product Code[/TD]
[TD]Price[/TD]
[TD]Discount[/TD]
[TD]Country[/TD]
[TD]Link[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]$10.34[/TD]
[TD]$9.31[/TD]
[TD]AU[/TD]
[TD]A1AU[/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]$12.76[/TD]
[TD]$11.48[/TD]
[TD]AU[/TD]
[TD]A2AU[/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]$18.79[/TD]
[TD]$16.91[/TD]
[TD]AU[/TD]
[TD]A3AU[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]$6.98[/TD]
[TD]$6.28[/TD]
[TD]AU[/TD]
[TD]B1AU[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]$5.43[/TD]
[TD]$4.89[/TD]
[TD]AU[/TD]
[TD]B2AU[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]$8.34[/TD]
[TD]$7.51[/TD]
[TD]AU[/TD]
[TD]B3AU[/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]$7.83[/TD]
[TD]$7.05[/TD]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TD]
[TD]43[/TD]
[TD]NZ[/TD]
[TD]B1NZ[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]57[/TD]
[TD]NZ[/TD]
[TD]B4NZ[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]44[/TD]
[TD]AU[/TD]
[TD]B2AU[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]66[/TD]
[TD]NZ[/TD]
[TD]A3NZ[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A2[/TD]
[TD]31[/TD]
[TD]NZ[/TD]
[TD]A2NZ[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]7[/TD]
[TD]AU[/TD]
[TD]B4AU[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Next I created a relationship for the 2 “Link” columns. Sorry I cannot paste the screenshot
I now want to use the relationship. The Value column in the Sales table is a simple calculated field ie =[Qty]*Price[Price] which should produce the “Value” of the sale. But I get the following error in every row
"The value for column 'Price' in table 'Price' cannot be determined in the current context. Check that all columns referenced in the calculation expression exist, and that there are no circular dependencies. This can also occur when the formula for a measure refers directly to a column without performing any aggregation--such as sum, average, or count--on that column. The column does not have a single value; it has many values, one for each row of the table, and no row has been specified."
What am I doing wrong!
