2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Dynamic Reference to Data in Pivot Table (part of data model)

Hi!

I have an excel with a big source data table (66k rows). I use pivot tables to summarize the data, and as normal pivot tables didn't show the data correctly, I always selected "add data to data model", and then it worked. Allthough the pivot tables look the same, they seem to work quite differently.

I now want to look up certain values in these new pivot tables. Specifically, I have a table with DoI on one axis and the year on the other axis, and I want dynamic references, so that I can drag the formula. How do I need to write it?

The table is directly linked to charts on a powerpoint, that's why I need it - there are some charts that are too complicated to link it directly to a pivot table.

Here's an example, the X$8 and the $W9 are the references I would usually use.

=GETPIVOTDATA("[Measures].[Sum of Value]",$D$8, "[PowerQuery_ALL_DATA_LONG_FORMAT].[Data Type]","[PowerQuery_ALL_DATA_LONG_FORMAT].[Data Type].&[Main Data]", "[PowerQuery_ALL_DATA_LONG_FORMAT].[Year]","[PowerQuery_ALL_DATA_LONG_FORMAT].[Year].&[X$8]", "[PowerQuery_ALL_DATA_LONG_FORMAT].[Status]","[PowerQuery_ALL_DATA_LONG_FORMAT].[Status].&[$W9]")

Thanks for your help!

Edit: I use MS 365, excel version 2511

Edit: this is how I would write it for a normal Pivot table, but it doesn't work in this case: =GETPIVOTDATA("Value",$D$8,"Data Type","Main Data","Status",$W9,"Year",X$8)

submitted by /u/New-Lingonberry9322
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#generative AI for data analysis
#big data management in spreadsheets
#conversational data analysis
#real-time data collaboration
#intelligent data visualization
#Excel compatibility
#rows.com
#natural language processing for spreadsheets
#financial modeling with spreadsheets
#AI formula generation techniques
#Pivot Table
#data model
#GETPIVOTDATA
#excel
#dynamic references
#source data table
#data summary
#measures
#data type