![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have the following problem: I would like to use Excel XL Pivot based on MS AS 2000 cuves for example Foodmart 2000. In 1 Excel file I have 2 sheets and on each sheet a different pivo table based on a different cube. -- I would like to have the cubes synchronized. So If I choice for example the citie for the Foodmart sales cube that the other pivot is also changed. Is this possible ? --- Is it possible to have a send a parameter to the pivot in Excel and have as result back both the 2 new pivots ? --- In Panorama NovaView you have for example dependent views. But I would like to use the default features of Excel and not the Excel addin. Regards, Marco |
#3
| |||
| |||
|
|
I answered a similar issue, earlier today, but this person had two pivottables on the one sheet. I have modified the sample to look across all the sheets in the current workbook and to synchronise all the pivottables it finds. '\\ This global flag stops event recursion Dim bUpdating As Boolean '\\ ================================================== =========== '\\ Author : Darren Gosbell '\\ Date : 12 Dec 2005 '\\ Description: Keeps the page fields of multiple PivotTables '\\ on the same sheet synchronised. '\\ ================================================== =========== Sub UpdateAllPivotTables(target As PivotTable) Dim pt As PivotTable Dim pf As PivotField Dim sht As Worksheet If Not bUpdating Then bUpdating = True Me.Application.ScreenUpdating = False '\\ For each pivot table on the current sheet '\\ find any pagefields with the same name as those '\\ in the sheet that was just changed and synchronise '\\ them. For Each sht In ThisWorkbook.Worksheets For Each pt In sht.PivotTables If pt.Name <> target.Name Then For Each pf In target.PageFields If Not pt.PageFields(pf.Name) Is Nothing Then pt.PageFields(pf.Name).CurrentPageName = pf.CurrentPageName End If Next pf End If Next pt Next sht Columns("B:B").EntireColumn.AutoFit Me.Application.ScreenUpdating = True bUpdating = False End If End Sub '************************************************* **************** '** This needs to be added to the code in every sheet that you '** want to trigger a change from. '************************************************* **************** Private Sub Worksheet_PivotTableUpdate(ByVal target As PivotTable) UpdateAllPivotTables target End Sub -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <1134337268.457537.214240 (AT) f14g2000cwb (DOT) googlegroups.com>, olap (AT) gmsbv (DOT) nl says... Hi, I have the following problem: I would like to use Excel XL Pivot based on MS AS 2000 cuves for example Foodmart 2000. In 1 Excel file I have 2 sheets and on each sheet a different pivo table based on a different cube. -- I would like to have the cubes synchronized. So If I choice for example the citie for the Foodmart sales cube that the other pivot is also changed. Is this possible ? --- Is it possible to have a send a parameter to the pivot in Excel and have as result back both the 2 new pivots ? --- In Panorama NovaView you have for example dependent views. But I would like to use the default features of Excel and not the Excel addin. Regards, Marco |
#4
| |||
| |||
|
|
I answered a similar issue, earlier today, but this person had two pivottables on the one sheet. I have modified the sample to look across all the sheets in the current workbook and to synchronise all the pivottables it finds. '\\ This global flag stops event recursion Dim bUpdating As Boolean '\\ ================================================== =========== '\\ Author : Darren Gosbell '\\ Date : 12 Dec 2005 '\\ Description: Keeps the page fields of multiple PivotTables '\\ on the same sheet synchronised. '\\ ================================================== =========== Sub UpdateAllPivotTables(target As PivotTable) Dim pt As PivotTable Dim pf As PivotField Dim sht As Worksheet If Not bUpdating Then bUpdating = True Me.Application.ScreenUpdating = False '\\ For each pivot table on the current sheet '\\ find any pagefields with the same name as those '\\ in the sheet that was just changed and synchronise '\\ them. For Each sht In ThisWorkbook.Worksheets For Each pt In sht.PivotTables If pt.Name <> target.Name Then For Each pf In target.PageFields If Not pt.PageFields(pf.Name) Is Nothing Then pt.PageFields(pf.Name).CurrentPageName = pf.CurrentPageName End If Next pf End If Next pt Next sht Columns("B:B").EntireColumn.AutoFit Me.Application.ScreenUpdating = True bUpdating = False End If End Sub '************************************************* **************** '** This needs to be added to the code in every sheet that you '** want to trigger a change from. '************************************************* **************** Private Sub Worksheet_PivotTableUpdate(ByVal target As PivotTable) UpdateAllPivotTables target End Sub -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <1134337268.457537.214240 (AT) f14g2000cwb (DOT) googlegroups.com>, olap (AT) gmsbv (DOT) nl says... Hi, I have the following problem: I would like to use Excel XL Pivot based on MS AS 2000 cuves for example Foodmart 2000. In 1 Excel file I have 2 sheets and on each sheet a different pivo table based on a different cube. -- I would like to have the cubes synchronized. So If I choice for example the citie for the Foodmart sales cube that the other pivot is also changed. Is this possible ? --- Is it possible to have a send a parameter to the pivot in Excel and have as result back both the 2 new pivots ? --- In Panorama NovaView you have for example dependent views. But I would like to use the default features of Excel and not the Excel addin. Regards, Marco |
#5
| |||
| |||
|
|
Outstanding! Been looking for something like this for ages. Thanks Darren. "Darren Gosbell" wrote: I answered a similar issue, earlier today, but this person had two pivottables on the one sheet. I have modified the sample to look across all the sheets in the current workbook and to synchronise all the pivottables it finds. '\\ This global flag stops event recursion Dim bUpdating As Boolean '\\ ================================================== =========== '\\ Author : Darren Gosbell '\\ Date : 12 Dec 2005 '\\ Description: Keeps the page fields of multiple PivotTables '\\ on the same sheet synchronised. '\\ ================================================== =========== Sub UpdateAllPivotTables(target As PivotTable) Dim pt As PivotTable Dim pf As PivotField Dim sht As Worksheet If Not bUpdating Then bUpdating = True Me.Application.ScreenUpdating = False '\\ For each pivot table on the current sheet '\\ find any pagefields with the same name as those '\\ in the sheet that was just changed and synchronise '\\ them. For Each sht In ThisWorkbook.Worksheets For Each pt In sht.PivotTables If pt.Name <> target.Name Then For Each pf In target.PageFields If Not pt.PageFields(pf.Name) Is Nothing Then pt.PageFields(pf.Name).CurrentPageName = pf.CurrentPageName End If Next pf End If Next pt Next sht Columns("B:B").EntireColumn.AutoFit Me.Application.ScreenUpdating = True bUpdating = False End If End Sub '************************************************* **************** '** This needs to be added to the code in every sheet that you '** want to trigger a change from. '************************************************* **************** Private Sub Worksheet_PivotTableUpdate(ByVal target As PivotTable) UpdateAllPivotTables target End Sub -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <1134337268.457537.214240 (AT) f14g2000cwb (DOT) googlegroups.com>, olap (AT) gmsbv (DOT) nl says... Hi, I have the following problem: I would like to use Excel XL Pivot based on MS AS 2000 cuves for example Foodmart 2000. In 1 Excel file I have 2 sheets and on each sheet a different pivo table based on a different cube. -- I would like to have the cubes synchronized. So If I choice for example the citie for the Foodmart sales cube that the other pivot is also changed. Is this possible ? --- Is it possible to have a send a parameter to the pivot in Excel and have as result back both the 2 new pivots ? --- In Panorama NovaView you have for example dependent views. But I would like to use the default features of Excel and not the Excel addin. Regards, Marco |
#6
| |||
| |||
|
|
Hi Darren, Maybe you can update the script with the loop. It is here also giving some errors when there are slicers not in the page field filter area. I am testing also the other script now. Regards, Marco MarkFrank schreef: |
#7
| |||
| |||
|
|
Hi Darren, Maybe you can update the script with the loop. It is here also giving some errors when there are slicers not in the page field filter area. I am testing also the other script now. Regards, Marco MarkFrank schreef: Outstanding! Been looking for something like this for ages. Thanks Darren. "Darren Gosbell" wrote: I answered a similar issue, earlier today, but this person had two pivottables on the one sheet. I have modified the sample to look across all the sheets in the current workbook and to synchronise all the pivottables it finds. '\\ This global flag stops event recursion Dim bUpdating As Boolean '\\ ================================================== =========== '\\ Author : Darren Gosbell '\\ Date : 12 Dec 2005 '\\ Description: Keeps the page fields of multiple PivotTables '\\ on the same sheet synchronised. '\\ ================================================== =========== Sub UpdateAllPivotTables(target As PivotTable) Dim pt As PivotTable Dim pf As PivotField Dim sht As Worksheet If Not bUpdating Then bUpdating = True Me.Application.ScreenUpdating = False '\\ For each pivot table on the current sheet '\\ find any pagefields with the same name as those '\\ in the sheet that was just changed and synchronise '\\ them. For Each sht In ThisWorkbook.Worksheets For Each pt In sht.PivotTables |
#8
| |||
| |||
|
|
I have created a workbook that will update all pivot tables on any sheet in the workbook, you can find a link to download it on my blog at: http://geekswithblogs.net/darrengosb.../14/63085.aspx I think this code is generic enough to handle most situations, but let me know if you run into any issues. -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <1134478085.868760.30890 (AT) g44g2000cwa (DOT) googlegroups.com>, olap (AT) gmsbv (DOT) nl says... Hi Darren, Maybe you can update the script with the loop. It is here also giving some errors when there are slicers not in the page field filter area. I am testing also the other script now. Regards, Marco MarkFrank schreef: Outstanding! Been looking for something like this for ages. Thanks Darren. "Darren Gosbell" wrote: I answered a similar issue, earlier today, but this person had two pivottables on the one sheet. I have modified the sample to look across all the sheets in the current workbook and to synchronise all the pivottables it finds. '\\ This global flag stops event recursion Dim bUpdating As Boolean '\\ ================================================== =========== '\\ Author : Darren Gosbell '\\ Date : 12 Dec 2005 '\\ Description: Keeps the page fields of multiple PivotTables '\\ on the same sheet synchronised. '\\ ================================================== =========== Sub UpdateAllPivotTables(target As PivotTable) Dim pt As PivotTable Dim pf As PivotField Dim sht As Worksheet If Not bUpdating Then bUpdating = True Me.Application.ScreenUpdating = False '\\ For each pivot table on the current sheet '\\ find any pagefields with the same name as those '\\ in the sheet that was just changed and synchronise '\\ them. For Each sht In ThisWorkbook.Worksheets For Each pt In sht.PivotTables |
![]() |
| Thread Tools | |
| Display Modes | |
| |