question on measures

wiz329

New Member
Joined
Jun 4, 2014
Messages
43
Hi guys, I'm fairly competent with excel (array formulas, macros, etc.), but new to powerpivot. I'm wondering if it's possible to do the following:

My data structure is as follows (give or take with table relationships etc. removed for simplicity):

Group NamePart Name
Transaction IDQuantityTotal Price
Group A
Part AOID12310$20
Group APart AOID12415$5
Group APart BOID12520$30
Group APart BOID12615$15
Group BPart COID12710$35
Group BPart COID1285$30
Group BPart DOID12910$10
Group BPart DOID13015$25

<tbody>
</tbody>

Basically, I'm trying to create a measure that will do the following:

First, I need to aggregate to an average selling price at the part level (not transaction price). So, I'm pretty sure the measure I would write would be the following: Average Selling Price = SUM ([Total Price]) / SUM([Quantity]).

The next part is to find percentiles, maxes, and mins of these part-level ASPs.

So, I need to find the 90th p-tile (or median, max, etc.) of all of the Average Selling Price Values for each part (*not* transaction) for each group.

In this case, then, to find the MAX ASP for all parts in Group A, I would do the following:
1. Find ASP for Part A and Part B.
Part A = ($20+$5)/(10+15) = $1.00
Part B = ($30+$15)/(20+15) = $1.29​
2. So the MAX would be $1.29. MAX{$1.00,$1.29}

Is there a way to do this in a scalable way with measures?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,473
Messages
6,125,018
Members
449,203
Latest member
tungnmqn90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top