Hi all,
I'm encountering a problem in getting data from a pivot table using two sets of arguments to getpivotdata(). Depending on how the Pivot Table is laid out, I sometimes get a #REF! with one or both the getpivotdata() calls.
I have a pivot table on a sheet with the following fields: Project, Cost Type, Cost Duration, Key, Min Cost, Max Cost. All fields are visible in the pivot table.
I use two variants of getpivotdata() in a 3rd sheet called 'Cost Summary':
variant A: getpivotdata(pivotTableVariable, "Sum of Max Cost", "Project", "X", "Cost Type", "Y", "Duration", Z)
variant B: getpivotdata(pivotTableVariable, "Sum of Max Cost", "Cost Type", "XYZ", "Cost Duration", "ABC")
Depending on the order of fields in the pivot table, one or both of these return #REF!. If I play around with the pivot table to move the fields around the right values pop up.
I thought that getpivotdata() worked as long as the data was visible and does not depend on the order of the fields.
Can you please tell me what I'm missing? Thanks a lot,
Sri
I'm encountering a problem in getting data from a pivot table using two sets of arguments to getpivotdata(). Depending on how the Pivot Table is laid out, I sometimes get a #REF! with one or both the getpivotdata() calls.
I have a pivot table on a sheet with the following fields: Project, Cost Type, Cost Duration, Key, Min Cost, Max Cost. All fields are visible in the pivot table.
I use two variants of getpivotdata() in a 3rd sheet called 'Cost Summary':
variant A: getpivotdata(pivotTableVariable, "Sum of Max Cost", "Project", "X", "Cost Type", "Y", "Duration", Z)
variant B: getpivotdata(pivotTableVariable, "Sum of Max Cost", "Cost Type", "XYZ", "Cost Duration", "ABC")
Depending on the order of fields in the pivot table, one or both of these return #REF!. If I play around with the pivot table to move the fields around the right values pop up.
I thought that getpivotdata() worked as long as the data was visible and does not depend on the order of the fields.
Can you please tell me what I'm missing? Thanks a lot,
Sri