SOLVED

How to use the cell reference with GetPivotData

%3CLINGO-SUB%20id%3D%22lingo-sub-2151635%22%20slang%3D%22en-US%22%3EHow%20to%20use%20the%20cell%20reference%20with%20GetPivotData%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2151635%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Team%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20trying%20to%20build%20relative%20references%20to%20an%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EOLAP%20cube%20using%20the%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EGETPIVOTDATA%20function%20%22Excel%20365%22.%26nbsp%3B%20When%20I%20create%20the%20initial%20formula%20by%20typing%20%22%3D%22%2C%20arrowing%20onto%20a%20field%20in%3CBR%20%2F%3Ethe%20cube%20and%20pressing%20enter%2C%20I%20get%26nbsp%3Bthe%20below%20view%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GetPivotData.PNG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256286i6AA857ED9C2C4E3D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22GetPivotData.PNG%22%20alt%3D%22GetPivotData.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20would%20like%20to%20replace%20%22Dissatisfied%22%20with%20a%20relative%20cell%20%22M%241%22%2C%20also%20replace%20%22X%22%20with%20cell%20%22%24L1%22%20so%20it%20should%20be%20working%20dynamic%20when%20I%20drag%20to%20right%20or%20down.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20Help%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%2C%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2151635%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2151854%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20the%20cell%20reference%20with%20GetPivotData%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2151854%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F704948%22%20target%3D%22_blank%22%3E%40Mohamed1988%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithin%20formula%20you%20may%20change%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E.%26amp%3B%5BDissatisfied%5D%22%2C%0Aon%0A.%26amp%3B%5B%22%20%26amp%3B%20M%241%20%26amp%3B%20%22%5D%22%2C%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2152491%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20the%20cell%20reference%20with%20GetPivotData%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2152491%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%2C%20at%20least%20it%20works%20successfully%2C%20much%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi Team,

 

I am trying to build relative references to an OLAP cube using the GETPIVOTDATA function "Excel 365".  When I create the initial formula by typing "=", arrowing onto a field in
the cube and pressing enter, I get the below view:

 

GetPivotData.PNG

I would like to replace "Dissatisfied" with a relative cell "M$1", also replace "X" with cell "$L1" so it should be working dynamic when I drag to right or down.

 

Any Help?

 

Thanks,

4 Replies
best response confirmed by Mohamed1988 (New Contributor)
Solution

@Mohamed1988 

Within formula you may change

.&[Dissatisfied]",
on
.&[" & M$1 & "]",

@Sergei Baklan , at least it works successfully, much appreciated!

@Mohamed1988 , you are welcome

@Sergei Baklan 

 

i am having a similar problem but your suggestion doesn't work for me. Can you see what is wrong here?

=GETPIVOTDATA("[Measures].[Sum of Quantity On Hand]",'TWE Pivot'!$A$3,"[Table2].[Item Number]","[Table2].[Item Number].&["&$A3&"]","[Table2].[Description]","[Table2].[Description].&["&$B3&"]")