How do I insert calculated field to pivot table?

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,922
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a column with calculated dates (column F) running next to a pivot table (columns G:H)

The number of rows expands as data is added and I would like to insert a calculated field with the formula as shown in column F
Field Row Labels represents weeks of the year
Field Sum of R are aggregate values per week from a named data table

Trade Journal.xlsm
FGH
2DateRow LabelsSum of R
307/09/2020376
414/09/202038-1
521/09/2020395
628/09/2020409
705/10/2020415
812/10/20204211
919/10/20204314
1026/10/2020442
1102/11/2020453
12Grand Total54
Weekly Summary
Cell Formulas
RangeFormula
F3:F11F3=LET(Min_Year,YEAR(MIN(Trade_Data[[#All],[Date]])),DATE(Min_Year,1,-2)-WEEKDAY(DATE(Min_Year,1,3))+$G3*7)


How do I create this field in the pivot table itself so that on refresh, it'll auto calculate and update?

TIA,
Jack
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Calculated fields are value fields, not row/column fields. If you're using the data model, you can probably create a calculated column for that, but that would belong in the Power BI section where the DAX people live. ;)
 
Upvote 0
Solution
Cool, yes, can see how a calculated column in the data table can achieve this. I'm still so basic with Power Query and barely touched Power BI!

Let me try that and confirm

.. that works, having slight formatting issue but can work with it, thanks @RoryA!
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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