Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

New Contributor II

QLIK Sense .NET API : trying to get measure/ dimension for all objects

I read the QLIK Sense for .NET API. I am able to get data (measure / dimension) for most of the objects except  TreeMap, Map, Distribution plot and Boxplot.

I used genericObject.GetHyperCubePivotDatafor Pivot,  List object for Filterpane and for others, I used genericObject.GetHyperCubeData.

What should I do for TreeMap, Map, Distribution plot and Boxplot? I am unable to get the measures and dimensions for these objects?

1 Reply

Re: QLIK Sense .NET API : trying to get measure/ dimension for all objects

To extract data from an object you need to know two things:

  1. Where in the properties structure are the hypercubes located.
  2. What modes do the hypercubes have.

For 1) you can do the following:

var allCubePaths = o.GetAllHyperCubePagers().Select(p => p.Path);

For 2) you'll need to inspect the "Mode"property of the cube and then use the "GetHypercubeData" version corresponding to that mode. Something like this:

var cubeMode = o.Properties.CloneSubstructureAs<HyperCubeDef>(cubePath).Mode;
switch (cubeMode)
    case NxHypercubeMode.DATA_MODE_PIVOT: ...
    case NxHypercubeMode.DATA_MODE_PIVOT_STACK: ...
    case NxHypercubeMode.DATA_MODE_STRAIGHT: ...
    case NxHypercubeMode.DATA_MODE_TREE: ...