Question

  • I have a pivot table on which i can slice data based on 3 different users so i create the offline cube for each of them independently using Analyse->OLAP Tools->Offline OLAP.

  • So i need to repeat this process 3 times since at one time i only select one user and deselect the other 2 in the offline OLAP cube creation wizard.

  • My question is that can this process be automated because in case there are ,say 100 users the manual work will be too much.
    Is there any solution for this?
    Can i get information on the plugin in Excel which does the Offline Cube Creation.
Was it helpful?

Solution

If anyone has the same problem please do the following:
Use the CreateCubeFile Method

Sub CreateCubeFile()
  ActiveSheet.PivotTables(“PivotTable1”).CreateCubeFile File:=”C:\CustomCubeFile.cub”
End Sub
  • The benefit of using this method is that the data in the offline cube file will consist of the exact data that existed in the pivot table at the time you executed the procedure.
  • For example, if your pivot table contains a page field that is filtered to show data for only the United States, then the offline cube that is created by the CreateCubeFile method will contain data only for the United States.
  • This is because the CreateCubeFile method essentially runs the MDX query behind the pivot table and outputs the results to a local .cub file.
  • So if you have the need to create several offline cubes, each containing a different set of data, you can simply automate the rearranging of the data fields with the pivot table and then employ the CreatCubeFile method.

The source of this data is:Link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top