Hello All,
I appreciate your great contribution to this forum, and in recognition of your wealth of knowledge I write to seek your assistance on an issues I am having. I have pivot table with data from cube, I need to filter the table based on the value of two date field Begin and end date. I have tried some of the script you used to assist in some issue but no success. I have sample of the data and Macro recorded filter script below. Thank you
Sub FilterMacro()
'
' FilterMacro Macro
' Date FilterMacro
'
'
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Date Dimension].[Fiscal Month].[Fiscal Month]").VisibleItemsList = Array( _
"[Date Dimension].[Fiscal Month].&[2013\14]&[5]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[6]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[7]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[8]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[9]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[10]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[11]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[12]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[1]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[2]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[3]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[4]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[5]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[6]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[7]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[8]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[9]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[10]")
End Sub
[TABLE="class: cms_table, width: 1225"]
<tbody>[TR]
[/TR]
[TR]
[TD]Date[/TD]
[TD="align: right"]1/01/2010[/TD]
[TD][/TD]
[TD]This Data is from MS SQL Cube , I want to filter using Begin date and End Date[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]End Date[/TD]
[TD="align: right"]30/06/2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Jan-2010[/TD]
[TD]Feb-2010[/TD]
[TD]Mar-2010[/TD]
[TD]Apr-2010[/TD]
[TD]May-2010[/TD]
[TD]Jun-2010[/TD]
[TD]Jul-2010[/TD]
[TD]Aug-2010[/TD]
[TD]Sep-2010[/TD]
[TD]Oct-2010[/TD]
[TD]Nov-2010[/TD]
[TD]Dec-2010[/TD]
[TD]Jan-2011[/TD]
[TD]Feb-2011[/TD]
[TD]Mar-2011[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (Central)[/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (North East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (South East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (South)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (Sydney Metro)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (West)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (Central)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (North East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (South East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (South)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (Sydney Metro)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]75[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I appreciate your great contribution to this forum, and in recognition of your wealth of knowledge I write to seek your assistance on an issues I am having. I have pivot table with data from cube, I need to filter the table based on the value of two date field Begin and end date. I have tried some of the script you used to assist in some issue but no success. I have sample of the data and Macro recorded filter script below. Thank you
Sub FilterMacro()
'
' FilterMacro Macro
' Date FilterMacro
'
'
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Date Dimension].[Fiscal Month].[Fiscal Month]").VisibleItemsList = Array( _
"[Date Dimension].[Fiscal Month].&[2013\14]&[5]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[6]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[7]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[8]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[9]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[10]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[11]", _
"[Date Dimension].[Fiscal Month].&[2013\14]&[12]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[1]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[2]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[3]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[4]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[5]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[6]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[7]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[8]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[9]", _
"[Date Dimension].[Fiscal Month].&[2014\15]&[10]")
End Sub
[TABLE="class: cms_table, width: 1225"]
<tbody>[TR]
[/TR]
[TR]
[TD]Date[/TD]
[TD="align: right"]1/01/2010[/TD]
[TD][/TD]
[TD]This Data is from MS SQL Cube , I want to filter using Begin date and End Date[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]End Date[/TD]
[TD="align: right"]30/06/2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Jan-2010[/TD]
[TD]Feb-2010[/TD]
[TD]Mar-2010[/TD]
[TD]Apr-2010[/TD]
[TD]May-2010[/TD]
[TD]Jun-2010[/TD]
[TD]Jul-2010[/TD]
[TD]Aug-2010[/TD]
[TD]Sep-2010[/TD]
[TD]Oct-2010[/TD]
[TD]Nov-2010[/TD]
[TD]Dec-2010[/TD]
[TD]Jan-2011[/TD]
[TD]Feb-2011[/TD]
[TD]Mar-2011[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (Central)[/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (North East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (South East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (South)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (Sydney Metro)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC (West)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (Central)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (North East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (South East)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (South)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DEF (Sydney Metro)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]75[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]