1 Reply Latest reply: May 24, 2018 5:17 PM by Danny Selgo RSS

    Help with qCalcCond on measure

    Danny Selgo

      Hello, I am trying to define a hyper cube, and I want to set a calculation condition on a measure. Right now I have the following:

       

       

      "qMeasures": [

       

        {

         "qDef": {

         "qLabel": "Foo",

         "qGrouping": "N",

         "qDef": "Bar",

         "qNumFormat": {

         "qType": "F",

         "qnDec": 2,

         "qUseThou": 0,

         "qFmt": "0.0%",

         "qDec": ".",

         "qThou": ","

        },

         "autoSort": true,

         "cId": "JXKjkd",

         "numFormatFromTemplate": true,

         "isCustomFormatted": false

        },

         "qSortBy": {

         "qSortByNumeric": -1,

         "qSortByLoadOrder": 1,

         "qExpression": {}

        },

         "qCalcCond": {

         "qv": "0"

        },

         "qCalcCondition": {

         "qCond": {

         "qv": "0"

        },

         "qMsg": {}

        }

        },

      ...

      ]

       

      I have other measures in my hypercube definition, but I'm setting the calc condition of this one to 0 to see if I can get it to stop displaying.

       

      I'm trying to create a pivot table with measures that will not calculate based on a variable I pass to qHyperCubeDef. However, when I set this measure to 0 to not calculate, the entire pivot table does not calculate. I get the following error in my console: "TypeError: Cannot read property 'qError' of undefined".

       

      If I exclude "qCalcCond" and "qCalcCondition", the pivot table works fine, but it still displays the measure I don't want it to.


      Am I just using qCalcCond wrong?