Hello, I have an OLAP Pivot. There is a Value in one of the rows that I want to move to the end. The field is called "Top Customer", the value is "All Other".
The vba recorder produces this:
The above works, but the problem is the Position can change from 1 - 20+ depending on the filters. I tried making the Position 99, which did not work. I have found other code that shows how to perform a count, but I could not get it to work because it was for non-OLAP pivots.
Any ideas?
Thank you for reading.
The vba recorder produces this:
Code:
ActiveSheet.PivotTables("PivotTable3").PivotFields( _
"[Sales Org Hierarchy].[Top Customer].[Top Customer]").PivotItems( _
"[Sales Org Hierarchy].[Top Customer].&[All Other]").Position = 5
The above works, but the problem is the Position can change from 1 - 20+ depending on the filters. I tried making the Position 99, which did not work. I have found other code that shows how to perform a count, but I could not get it to work because it was for non-OLAP pivots.
Any ideas?
Thank you for reading.