Scan function in calculated field in excel pivot table

sharshra

Active Member
Joined
Mar 20, 2013
Messages
404
Office Version
  1. 365
Is it possible to use functions like Scan, Reduce, Lambda etc in calculated fields in excel pivot table?

For example, consider the table below. I would like to have a running total as a calculated field. I can use Scan function outside pivot table to get the running totals. Tried using it in calculated field, but not getting any result.

Base table:
Book1
CD
2DateAmount
32-may-2120
415-jul-215
52-mar-2230
629-abr-237
78-sep-2350
830-sep-2311
917-nov-2343
103-ene-2423
1128-feb-2412
Sheet1


Pivot table:
Book1
FGH
2YearSum of Amount
320212525
420223055
52023111166
6202435201
7Grand Total201
Sheet1
Cell Formulas
RangeFormula
H3:H6H3=SCAN(0,G3:G6,LAMBDA(a,b,a+b))
Dynamic array formulas.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
There is no need to have a calculated field. You can go into the field settings for the amount, go the the tab that says 'Show Values As', and select 'Running Total In' from the dropdown.
 
Upvote 0
Thanks, @irobbo314. It works for running total & anything available in the drop down in `show value as´ option.

However, I would to like to know if it is possible to use the functions like scan, let, lambda, reduce etc in the calculated fields.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,111
Members
453,021
Latest member
Justyna P

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