I have a table showing a summary of values with a column for date, row type (Actuals or Budget), and the value.
I arrange this in (Power) pivot table where my Type and Date columns are in the columns, and then values are obviously in the values section. The result, for a given month, is that it shows me Actuals and Budget side-by-side.
I want to add a third column for variance between Actuals and Budget. So I tried using calculate,
=CALCULATE(SUM[Values],[Type] = "Actual")-CALCULATE(SUM[Values],[Type] = "Budget")
But the result of this is 4 columns because it repeats the variance calculation for each of the Actuals and Budget values which are in the column labels.
What's the proper way to create a calculated field to calculate the difference between two values within a single column?
It's almost like I want to mimic having row in my source table where the value in the Type column is Actuals vs. Budget, but PowerPivot, you cannot do this.
Thanks
I arrange this in (Power) pivot table where my Type and Date columns are in the columns, and then values are obviously in the values section. The result, for a given month, is that it shows me Actuals and Budget side-by-side.
I want to add a third column for variance between Actuals and Budget. So I tried using calculate,
=CALCULATE(SUM[Values],[Type] = "Actual")-CALCULATE(SUM[Values],[Type] = "Budget")
But the result of this is 4 columns because it repeats the variance calculation for each of the Actuals and Budget values which are in the column labels.
What's the proper way to create a calculated field to calculate the difference between two values within a single column?
It's almost like I want to mimic having row in my source table where the value in the Type column is Actuals vs. Budget, but PowerPivot, you cannot do this.
Thanks