Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
ajaykakkar93
Contributor III

Can we calculate Master Measure using Engine API?

Hi All,

    I need your help on calculating a master measure from Engine API, Can it be done.

  1. Master Measure is made from dashboard
  2. We can get the qLibraryId from Qlik Engine Macros : List Measure
  3. Now i want to calculate it i am using a different approach (ill agg my approach in this message)
    1. i am making a HyperCube to get this calculated in the below way
    2. ---------------------------------
      "qLibraryId" Master measure id here
      ---------------------------------
      
      {
        "jsonrpc": "2.0",
        "id": 2,
        "method": "CreateChild",
        "handle": 2,
        "params": [
          {
            "qInfo": {
              "qId": "Chart1",
              "qType": "Chart"
            },
            "qHyperCubeDef": {
              "qStateName": "$",
              "qMeasures": [
                {
                  "qLibraryId": "bMYBRC"
                }
              ],
              "qInitialDataFetch": [
                {
                  "qTop": 0,
                  "qLeft": 0,
                  "qHeight": 100,
                  "qWidth": 100
                }
              ]
            }
          }
        ]
      }
      --------------------------------------
      GetLayout
      --------------------------------------
      {
      	"handle": 2,
      	"method": "GetLayout",
      	"params": {}
      }

      ----------------------------------------------------------------------------------------------------------------------
      IS THIS THE CORRECT APPROACH, If you can suggest a quick aproach ill be happy to try it out
      ----------------------------------------------------------------------------------------------------------------------
Regards & Thanks,
Ajay Kakkar
ajaykakkar93@gmail.com
Labels (4)