Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm developing an extension to display a pivot table using an hypercube. Before accomplished this I have created a pivot table into my Qlik sense App to check result that will be cloned into my extension.
The issue is the follow:
I have:
- two dimensions: "Model" and "Country"
- two measures : "FBD" and "LTR"
I wanna obtain this:
But I obtain this in my hypercube:
Below you can see my hypercube def and I think to have setted qInterColumnSortOrder array in the right way.
var myProps = {
textColor: "black",
qHyperCubeDef: {
qDimensions: [],
qMeasures: [],
qInitialDataFetch: [
{
qTop: 0,
qLeft: 0,
qWidth: 100,
qHeight: 300
}
],
qInterColumnSortOrder: [0, -1, 1],
//qPseudoDimPos:1,
qNoOfLeftDims: 2,
qMode: "P",
qAlwaysFullyExpanded: true,
qIndentMode: false
}
};
var myDefinition = {
type: "items",
component: "accordion",
items: {
dimensions: {
uses: "dimensions",
min: 2,
max: 2
},
measures: {
uses: "measures",
min: 2,
max: 2
},
sorting: {
uses: "sorting"
},
settings: {
uses: "settings"
}
}
};
Sometimes will be loaded the columns like my qInterColumnSortOrder , but another in this order: -1,0,1.
I don't know where there is a conflict or other issue.
Have you any idea to solve this?
Thank you all,
Simone
I have solved using backend-API method "applyPatches".
With this method i replace column order after render.
paint: function($element, layout) {
var app = qlik.currApp();
this.backendApi
.applyPatches(
[
{
qPath: "/qHyperCubeDef/qInterColumnSortOrder",
qOp: "replace",
qValue: "[0,-1,1]"
}
],
true
)
}
I have solved using backend-API method "applyPatches".
With this method i replace column order after render.
paint: function($element, layout) {
var app = qlik.currApp();
this.backendApi
.applyPatches(
[
{
qPath: "/qHyperCubeDef/qInterColumnSortOrder",
qOp: "replace",
qValue: "[0,-1,1]"
}
],
true
)
}