Forum

Notifications
Clear all

Getpivotdata Help

3 Posts
2 Users
0 Reactions
70 Views
(@raman)
Posts: 33
Trusted Member
Topic starter
 

Hi

I am adding grand total  of two separate pivot tables made out of power pivot data model manually through getpivotdata function.  When I filter the data,

the formula shows ref #REF.

The formula is =GETPIVOTDATA("[Measures].[Total amt]",$A$2,"[Cal].[Month]","[Cal].[Month].&[May 21]")+GETPIVOTDATA("[Measures].[Total amt]",$A$10,"[Cal].[Month]","[Cal].[Month].&[May 21]")

When I filter the pivot tables with another month say "Apr 21", it shows error.  Can I make that month name dynamic?

Pls help

 
Posted : 25/05/2021 9:46 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

Do you have a sample file to share? That would be easier for everyone as it's then not necessary to create new file with dummy data.

I assume you filter the data via a slicer and also assume that you always want to see one months data, not several.
If you copy the Pivot Table and paste it in another sheet, rearrange so that it only lists the month choosen in the slicer, then you can reference that cell.

Br,
Anders

 
Posted : 26/05/2021 4:43 am
(@raman)
Posts: 33
Trusted Member
Topic starter
 

Hi Anders

Thanks for reply.

I got it solved.  In the month text in getpivotdata, I inserted "&cellreference&" and go it solved.

Thanks.

 
Posted : 29/05/2021 8:45 am
Share: