I have a powerpivot table that looks like this... all "facts" are in a single table with the Information column used to segregate:
Information | Year | Amount
Expense 2010 1000000
Units Sold 2010 50000
Expense 2011 2000000
Units Sold 2011 125000
I would like to be able to calculate various ratios. This seems like a straightforward need, but I've not been able to figure it out or find a solution online.
For example...
- Expense / Units Sold for 2010, 2011 or combined (based on filters applied in Excel)
- ..... 2010 = 1000000/50000 = 20; 2011 = 2000000/125000 = 16; all time = 3000000/175000 = 17.14 ETC.
In reality there are many more dimensions (region, location, month, etc.) and other Information types (headcount, square footage, etc.), but only three or four denominators, so I am hopeful the solution will scale out.
How can I do that in Powerpivot? I can calculate the denominator using (as an example) CALCULATE(SUM(fact[amount]),fact[information]="Units Sold")), but cannot get that denominator applied against all numerators.
x x x x
Adding follow up based on the answer provided below...
Issue #1: The solution provided below works when I am looking at Total Expenses, but in reality the Expense line will be multiple lines (Salary, Benefits, Rent, etc.) and I need to be able to calculate each per Unit Sold. The solution doesn't seem to allow for this.
Issue #2: The fact table currently has four different information types ... Expenses (broken out as noted above), Units Sold, Headcount and Square Footage. What I would like to be able to do is have Expenses per Until Sold, Headcount per Unit Sold, etc. In other words, a denominator that can be applied against all rows which then can be summed in the pivot table easily. The solution takes everything that is not Units Sold, sums it and then divides by Units Sold... blending Expenses, Headcount and Square Footage.
Thanks again for the assistance.