R
Ron
I am trying to use the IncludedMembers to filter by Week Number. This
is working fine if a manually enter a value. The problem I am having
is that I want to create a variable from the field "Week" that is the
highest week number, so that it will change the IncludedMembers on a
weekly basis as the new data is imported. It would also work if I
could use a record count since they are the same numbers. Thanks for
any help.
Dim oView
Set oView = Pivot.ActiveView
'Add fields to the row axis and column axis for grouping.
oView.RowAxis.InsertFieldSet oView.Fieldsets("POS")
oView.RowAxis.InsertFieldSet oView.Fieldsets("LP")
oView.RowAxis.InsertFieldSet oView.Fieldsets("Week")
oView.Fieldsets("Week").Fields("Week").IncludedMembers = "34"
is working fine if a manually enter a value. The problem I am having
is that I want to create a variable from the field "Week" that is the
highest week number, so that it will change the IncludedMembers on a
weekly basis as the new data is imported. It would also work if I
could use a record count since they are the same numbers. Thanks for
any help.
Dim oView
Set oView = Pivot.ActiveView
'Add fields to the row axis and column axis for grouping.
oView.RowAxis.InsertFieldSet oView.Fieldsets("POS")
oView.RowAxis.InsertFieldSet oView.Fieldsets("LP")
oView.RowAxis.InsertFieldSet oView.Fieldsets("Week")
oView.Fieldsets("Week").Fields("Week").IncludedMembers = "34"