Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
s29124141
Partner - Creator II
Partner - Creator 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
Partner - Creator II
Partner - Creator II
Author

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.

View solution in original post

7 Replies
Vincenzo_Esposito

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

ErikWetterberg

Yianni_Ververis
Employee
Employee

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

s29124141
Partner - Creator II
Partner - Creator II
Author

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
Partner - Creator II
Partner - Creator II
Author

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.

dannyy81
Contributor III
Contributor III

I wonder if there is solution other than island table

 

muhammadraza
Partner - Creator
Partner - Creator

I resolved it by ignoring the fields selection in the set analysis in qMeasures

"qMeasures":[
{
"qDef":{
"qDef":"num(Count({<group=, field1=, field2=, field3=,  parent=>}person))"
},
"qLabel":"test",
"qLibraryId":null,
"qSortBy":{
"qSortByState":0,
"qSortByFrequency":0,
"qSortByNumeric":0,
"qSortByAscii":1,
"qSortByLoadOrder":0,
"qSortByExpression":0,
"qExpression":{
"qv":" "
}
}
}
]