Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am importing a csv file to create a table based on the matching dimensions/measures and an if statement. I would like the if statement to populate in the "Show Column If" in the table. I am using the capability API to do this but I am open to using enigma as well. Below is an example of what I am trying. I have tried the calcCond property which is what I think it is supposed to reference. Edit: Just to be clear, I can get it to conditionally show and hide from these but it is not populating the "Show Column If" property for the table in the properties panel. This means no one can edit it in the future.
app.visualization.create('table', [
{
qLibraryId: metric.MasterItemID,
qType: 'dimension',
qNullSuppression: true,
qOtherTotalSpec: {
qOtherMode: 'OTHER_OFF',
qSuppressOther: true,
qOtherSortMode: 'OTHER_SORT_DESCENDING',
qOtherCounted: {
qv: '5',
},
qOtherLimitMode: 'OTHER_GE_LIMIT',
},
qCalcCond: {
qv: '1=1',
},
qCalcCondition: {
qCalcCond: {
qv: '1=1',
},
},
}]
In classic forum fashion, I figured it out right after posting this. The qCalcCondition is what is needed but it needs to be formatted differently. I also had to move the qType to the end.
{
qLibraryId: metric.MasterItemID,
qNullSuppression: true,
qOtherTotalSpec: {
qOtherMode: 'OTHER_OFF',
qSuppressOther: true,
qOtherSortMode: 'OTHER_SORT_DESCENDING',
qOtherCounted: {
qv: '5',
},
qOtherLimitMode: 'OTHER_GE_LIMIT',
},
qCalcCondition: {
qCond: {
qv: "1=1",
},
qMsg: {
qv: '',
},
},
qType: 'dimension',
};
In classic forum fashion, I figured it out right after posting this. The qCalcCondition is what is needed but it needs to be formatted differently. I also had to move the qType to the end.
{
qLibraryId: metric.MasterItemID,
qNullSuppression: true,
qOtherTotalSpec: {
qOtherMode: 'OTHER_OFF',
qSuppressOther: true,
qOtherSortMode: 'OTHER_SORT_DESCENDING',
qOtherCounted: {
qv: '5',
},
qOtherLimitMode: 'OTHER_GE_LIMIT',
},
qCalcCondition: {
qCond: {
qv: "1=1",
},
qMsg: {
qv: '',
},
},
qType: 'dimension',
};
Thank you, I was just having the same issue.
FYI, I could enter it with less code:
qCalcCondition: { qCond: "=1" }
Now, I need to know how to do it to the object, so that Add-ons > Data handling > Calculation condition populates.