francoisdublin
New Member
- Joined
- Jan 23, 2014
- Messages
- 32
Hello
I wonder who's come across this and found a solution?
I am looking to prorate costs in one table based on quantity in another table but can't figure out how to create a measure for this allocation.
Any hints or insights? Thanks in advance.
Example Calculation
In the example below, for January 2014,
Sample Data
Downloadable workbook with data and pivot
e.g.
Cost table
[TABLE="width: 267"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Product[/TD]
[TD]Cost[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 267"]
<tbody>[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]02/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
Sales Table (for Quantity)
[TABLE="width: 373"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Product[/TD]
[TD]Qty[/TD]
[TD]Channel[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]10[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]5[/TD]
[TD]Supermarket[/TD]
[/TR]
[TR]
[TD]02/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]5[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]6[/TD]
[TD]Supermarket[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]10[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]20[/TD]
[TD]Supermarket[/TD]
[/TR]
</tbody>[/TABLE]
I wonder who's come across this and found a solution?
I am looking to prorate costs in one table based on quantity in another table but can't figure out how to create a measure for this allocation.
Any hints or insights? Thanks in advance.
Example Calculation
In the example below, for January 2014,
- The Cost table shows a total Cost incurred for Apples of 110. This is the cost to allocate per channel.
- The Sales table shows that 10 apples were sold through Retail and 25 through Supermarket i.e. 29% and 71% respectively.
- The cost allocation therefore is 110*29% and 110*71% respectively.
Sample Data
Downloadable workbook with data and pivot
e.g.
Cost table
[TABLE="width: 267"]
<tbody>[TR]
[TD]Date
[/TD]
[TD]Product[/TD]
[TD]Cost[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 267"]
<tbody>[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]02/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]
Sales Table (for Quantity)
[TABLE="width: 373"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Product[/TD]
[TD]Qty[/TD]
[TD]Channel[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]10[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]5[/TD]
[TD]Supermarket[/TD]
[/TR]
[TR]
[TD]02/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]5[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Kiwis[/TD]
[TD]6[/TD]
[TD]Supermarket[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Bananas[/TD]
[TD]10[/TD]
[TD]Retail[/TD]
[/TR]
[TR]
[TD]01/01/2014[/TD]
[TD]Apples[/TD]
[TD]20[/TD]
[TD]Supermarket[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: