• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Power Pivot Calculated column (measure?) - pivot table with multiple source tables and "relationship"

Carlt

New Member
I have a list of unique codes each with a fixed budget amount.

I have one file per month with expenses (multiple rows per code from the budget).

I created a "relationship" between the budget table code field and the code in EACH of the monthly tables.

I have a pivot table with a column showing the budget amount.

\--

Then I added the sum of transaction amounts for each of the monthly files to the pivot table values. The "relationships" worked to show the correct sum for each budget code - one pivot table column per month (without adding any fields to the pivot table "columns" section).

Now I'd like to add a calculated column showing the budget amount, minus the sum of all of the monthly columns in the pivot table. So it is the first pivot table column minus all of the other pivot table columns. Then I'd like to use that calculated total expense column to calculate another column showing the total percent spent of the initial budget column.

\--

The pivot table option for calculated values is greyed out because I have established a "relationship" between multiple tables that connect to the single pivot table.

So can this be done in Power Pivot? I need it to be a Pivot Table and not a regular table because the budget codes are in other buckets that I need to show subtotals for.

Thanks for any help anyone's willing to give.
 
Best is to append all month expenses into a single table through Power Query. Loading this table in the data model. Second create a calendar table in the data model.
Create the measures:
Total expenses: SUM([expenses])
Total budget: SUM([budget])
Percent of budget: DIVIDE([Total expenses], [Total budget])
 
Back
Top