Hi
I have a cube that pulls data from an operating system and displays it in an excel pivot table. I have setup the pivot table to show me information that updates every 10minutes. I would like to be able to update the date filter on the pivot table by using a date in a cell or some code. I have recorded a macro, and just need to know how I can set the date to a cell reference or if I can update this code to change the date?
Sub date_change()
'
'
ActiveSheet.PivotTables("PivotTable4").PivotFields( _
"[Time].[DateCode].[DateCode]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable4").PivotFields( _
"[Time].[DateCode].[DateCode]").CurrentPage = "[Time].[DateCode].&[20180619]"
End Sub
I have a cube that pulls data from an operating system and displays it in an excel pivot table. I have setup the pivot table to show me information that updates every 10minutes. I would like to be able to update the date filter on the pivot table by using a date in a cell or some code. I have recorded a macro, and just need to know how I can set the date to a cell reference or if I can update this code to change the date?
Sub date_change()
'
'
ActiveSheet.PivotTables("PivotTable4").PivotFields( _
"[Time].[DateCode].[DateCode]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable4").PivotFields( _
"[Time].[DateCode].[DateCode]").CurrentPage = "[Time].[DateCode].&[20180619]"
End Sub