Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Sense Community,
I am trying to create a Hypercube within a Qlik Sense Extension. Everything works fine when I define qDimensions and qMeasures with pre defined Fields.
For Example: (Note that "acitivtiy_id" and "counter" is the name of the columns)
var cubeDef = {
qDimensions: [{
qDef: {qFieldDefs: [activity_id] }
}],
qMeasures: [{
qDef: {
qDef: "=Sum(counter)",
}
}],
qInitialDataFetch: [{
qTop: 0,
qLeft: 0,
qHeight: 100,
qWidth: 2
}]
}
However, when I try to replace "counter" with a value from the Propertie-Panel it does not work for the qMeasures Definition.
qFieldDefs works as expected. But qMeasures--> qDef is always set to 0 in the Hypercube. If I print out the value with
console.log("Properties (Counter): ", layout.props.hcSection.hc1Counter); it gives me the right the value back.
var cubeDef = {
qDimensions: [{
qDef: {
qFieldDefs: [layout.props.hcSection.hc1ActivityID], /** This Works */
}
}],
qMeasures: [{
qDef: {
qDef: "=Sum(layout.props.hcSection.hc1Counter)", /** This doesn't work */
}
}],
qInitialDataFetch: [{
qTop: 0,
qLeft: 0,
qHeight: 100,
qWidth: 2
}]
}
Hope someone can help me.
Best regards Frank
FYI
The Solution is realy simple if you know how Qlik Sense works:
qDef: layout.props.hcSection.hc1Counter // this is the reference to the Input field
In the propertie Tab just type " =Sum(counter) " and everything works fine.
Maybe this is helpfull for someone else.
FYI
The Solution is realy simple if you know how Qlik Sense works:
qDef: layout.props.hcSection.hc1Counter // this is the reference to the Input field
In the propertie Tab just type " =Sum(counter) " and everything works fine.
Maybe this is helpfull for someone else.