How to add calculated rows and calculated columns in power pivot table?

manekankit

Board Regular
Joined
Feb 1, 2019
Messages
71
Office Version
  1. 365
Platform
  1. Windows
Context: Preparation of income statement through power pivot.
Data Source: period wise details of income and expense loaded through external excel file to power query and power pivot model.

Left side table:
1. This left side table is loaded to power query and power pivot data model through external excel
2. It has year to date cumulative (Jan to Nov, Janto Oct and so on) numbers of income, expenses and tax for various months

Right side table:
3. This right side table is the output required automatically through power pivot table (currently it is manually prepared for taking screenshot)
4. Rows highlighted in grey are calculated values (e.g. Profit before tax = total income - total expenses)
5. Columns highlighted in orange are calculated value (e.g. 'Monthly Nov'22' column = 'YTD Nov22' minus 'YTD Oct'22' and so on)

Questions:
1. How to add calculated rows (like 'Total Income', 'Profit before tax' and 'Profit after tax' in the pivot table?
2. How to add calculated columns (like 'Monthly Nov-22', 'Oct-22' and 'Monthly Sep-22')
3. Currently data source contains four months (Aug22 to Nov22), however it will also increase in future (i.e. in next month it will be Aug22 to Dec22 and accordingly in right side table, one additional column for monthly Dec22 will be added).


Requesting community members to guide how to generate required output table through power pivot or any other alternative.

Image:
not able to attach images here due to some technical error,
you may refer images on below link of the Microsoft forum


Link to image

 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

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