# Calculating percentage ytd actual to budget



## AronEpstein (Aug 27, 2012)

i have a powerpivot with data as follows

Cost CenterExpense TypeMonthAmountEastAdminBudget10000EastAdminJanuary500EastAdminFebruary650

<TBODY>

</TBODY>







I want to calculate the total ytd (1150) as a percentage of the budget (10,000).


----------



## texasalynn (Aug 27, 2012)

try this

Excel 2003ABCDE1Cost CenterExpense TypeMonthAmountPercentage2EastAdminBudget1000090%3EastAdminJanuary5004%4EastAdminFebruary6506%Sheet7Cell FormulasRangeFormulaE2=D2/SUM($D$2:$D$4)E3=D3/SUM($D$2:$D$4)E4=D4/SUM($D$2:$D$4)


----------



## powerpivotpro (Aug 28, 2012)

Aron how about two simple CALCULATE measures and then a ratio measure?

[Budget Measure] =
CALCULATE(SUM(TableName[Amount]), TableName[Month] = "Budget")

[Actuals Measure] =
CALCULATE(SUM(TableName[Amount]), TableName[Month] <> "Budget")

[Ratio] = 
[Actuals Measure] / [Budget Measure]

There are many ways in which this approach is incomplete, but depending on your needs this might be perfect.


----------



## AronEpstein (Aug 28, 2012)

Thanx. This was perfect.


----------

