Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

s29124141
Contributor II

app.CreateCube - Get all the values instead of current selections

I am using createCube method and I get only the current selections if there is any selections and all the values if there is no selection. Can some one help me fetch all the values even irrespective of current selections. Tried passing different "qStateName" to the createcube hypercube definition, nothing works.

Below are the help links followed.

createCube method ‒ Qlik Sense

HyperCubeDef ‒ Qlik Sense

Tagging experts for help. erik.wetterbergjvs

1 Solution

Accepted Solutions
s29124141
Contributor II

Re: app.CreateCube - Get all the values instead of current selections

I ended up creating new island table fields, which not be used for user selection and create the cube out of it. Thanks all for the help!

Its so weird that app.CreateCube does not have feature to get all the selections.

5 Replies
Employee
Employee

Re: app.CreateCube - Get all the values instead of current selections

Did you pass also the value 1 in the qState which actually means for Qlik (do not consider current selection)?

erik_wetterberg
Honored Contributor

Re: app.CreateCube - Get all the values instead of current selections

Hi,

Try creating the alternate state before using it.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
Employee
Employee

Re: app.CreateCube - Get all the values instead of current selections

Did you try to add {1} before your field in your Set Analysis?

s29124141
Contributor II

Re: app.CreateCube - Get all the values instead of current selections

I tried passing qStateName as '1', still it returns me only the currently selected values.

HyperCubeDef: {

            qStateName: '1',

            qInitialDataFetch: [{ qHeight: 500, qWidth: 3 }],

            qDimensions: []

        }

s29124141
Contributor II

Re: app.CreateCube - Get all the values instead of current selections

I ended up creating new island table fields, which not be used for user selection and create the cube out of it. Thanks all for the help!

Its so weird that app.CreateCube does not have feature to get all the selections.

Community Browser