Create an ARRAY within LARGE using GETPIVOTDATA

RedOctobir

New Member
Joined
Feb 17, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I've got a report that is showing trended data, but there are some sporadic data integrity issues. We're trying to correct the problem by replacing the bad value with the average of the two largest items available.

The data is dynamic depending on what the user selects so we're using the GETPIVOTDATA formula.

Basically this is what I need:

AVERAGE(LARGE({GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-1)),GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-2)),GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-3)),1),
LARGE({GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-1)),GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-2)),GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-3)),2))

But I can't seem to figure out how to create an array from multiple GETPIVOTDATA formulas. Any ideas? Is this even possible?

Thanks!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Maybe this can help: =LARGE(GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,{-1;-2;-3})),1)
 
Upvote 0
Solution
or this: =AGGREGATE(14,6,(GETPIVOTDATA(FieldName,Location,Month,EDATE(A$2,-ROW(1:10)))),1)
 
Upvote 0

Forum statistics

Threads
1,216,272
Messages
6,129,822
Members
449,538
Latest member
cookie2956

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