Hi all,
I have this code for a normal PivotTable but external data source. I will like the second code snippet for cubefield to do the same as this first code snippet for normal PivotTable.
I will like an equivalent code for a CubeField to replace this line of code:
I will like to loop and check for Items with DC-* but not DC-Planning.
Thanks in advance.
The items are about 100 for the above code, but I like to have
I have this code for a normal PivotTable but external data source. I will like the second code snippet for cubefield to do the same as this first code snippet for normal PivotTable.
Code:
'Filter the PageField
With WS.PivotTables("xLabor")
.PivotCache.MissingItemsLimit = xlMissingItemsNone
'.PivotCache.Refresh
With .PivotFields("System Source")
.PivotItems(1).Visible = True
For i = 2 To .PivotItems.Count
.PivotItems(i).Visible = False
Next
End With
With .PivotFields("System Source")
.PivotItems("BAP").Visible = True
.PivotItems("BGL").Visible = True
.PivotItems("BTL").Visible = True
.PivotItems(1).Visible = False
End With
End With
I will like an equivalent code for a CubeField to replace this line of code:
Code:
With ActiveSheet.PivotTables("NON-LABOR").CubeFields("[CSVFolderPivotTable].[FAIN]")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("NON-LABOR").PivotFields("[CSVFolderPivotTable].[FAIN].[FAIN]").VisibleItemsList = Array("", "", "[CSVFolderPivotTable].[FAIN].&[DC-05-0011]", "", "", "", "", "", "", "", "", "", "", "", _
"", "", "", "", "", "", "", "[CSVFolderPivotTable].[FAIN].&[DC-2017-005]", "", "", "", "", "", "", "[CSVFolderPivotTable].[FAIN].&[DC-2018-002]", "[CSVFolderPivotTable].[FAIN].&[DC-04-0007]", "[CSVFolderPivotTable].[FAIN].&[DC-04-0008]", _
"[CSVFolderPivotTable].[FAIN].&[DC-2016-007]", , "[CSVFolderPivotTable].[FAIN].&[DC-95-X015]")
I will like to loop and check for Items with DC-* but not DC-Planning.
Thanks in advance.
The items are about 100 for the above code, but I like to have
Last edited: