0 Replies Latest reply: Dec 6, 2016 7:33 AM by moran pliner RSS

    getting data from pivot table with multiple dimensions

    moran pliner

      Hi,

       

      While trying to extract data from pivot-table that has more than one dimension  I noticed that I receive only the measures from the hypercube,

      In the following example pt_dim.Count()=3 and pt_m.Count()=2 and numOfColumns= 2.

      I also noticed that the HyperCubeMode is DATA_MODE_PIVOT_STACK and I tried to change it but it didn't work.

       

      This also happens in linechart with multiple dimensions.

       

      The code:

       

      IGenericObject iGenObj = (IGenericObject)iapp.GetGenericObject(objId);

      Pivottable pt = (Pivottable)iGenObj;

      mode = pt.Properties.HyperCubeDef.Mode;//mode=NxHypercubeMode.DATA_MODE_PIVOT_STACK

       

      IEnumerable<HyperCubeDimensionDef> pt_dim = pt.Properties.HyperCubeDef.Dimensions;//pt_dim.Count()=3

      IEnumerable<HyperCubeMeasureDef> pt_m = pt.Properties.HyperCubeDef.Measures;//pt_m .Count()=2

       

      HyperCubePager hcp = pt.HyperCubePager;

      int numOfColumns = hcp.NumberOfColumns;//2

      int numOfRows = hcp.NumberOfRows;

             

      IEnumerable<NxDataPage> pages = hcp.GetData(new[] { new NxPage { Top = 0, Height = numOfRows, Left = 0, Width = numOfColumns } });

       

      IEnumerable<NxCellRows> rows = page.Matrix;

      //The matrix contains only measures columns data.

      ...

       

      Thanks in advanced,

      Moran