Skip to main content

Integration, Extension & APIs

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

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
timsworldroamer
Partner - Contributor III
Partner - Contributor III

Measure created using the CreateMeasure method not showing up in Master Items

Hi everyone,

I've created a measure using the Engine API's CreateMeasure method:

var request3 =

  {

  "jsonrpc": "2.0",

  "handle": 1,

  "method": "CreateMeasure",

  "params": [

  {

  "qInfo": {

  "qID":"Measure01",

  "qType":"Measure"

  },

  "qMeasure": {

  "qLabel":"YTD Sales 2017",

  "qDef":"Sum({<yearweek={\">=201701\"}>}sales)",

  "qExpressions": [

  "Sum({<yearweek={\">=201701\"}>}sales)"

  ],

  }

  }

  ],

  "id": 3

  };

The server responded and looked fine:

{"jsonrpc":"2.0","id":3,"result":{"qReturn":{"qType":"GenericMeasure","qHandle":2,"qGenericType":"Measure","qGenericId":"d6519538-8145-44a0-8082-1b2c28e0198d"},"qInfo":{"qId":"d6519538-8145-44a0-8082-1b2c28e0198d","qType":"Measure"}},"change":[2]}


However when I tried to locate the same in the Sense UI, it's still showing up as empty.


Capture.JPG


Would anyone be able to help me out?


Thanks in advance!


Tim

6 Replies
d_pranskus
Partner - Creator III
Partner - Creator III

Hi

Same problem through enigma.js

Darius

ErikWetterberg

Hi,

Not sure about this, but try with qType: 'measure' instead.

Hope this helps

Erik Wetterberg

karthikeyakam
Partner - Contributor
Partner - Contributor

Hi

CreateMeasure method creates the measures but are not visible on the front end.

You can fetch them by using List Measures method.

Hope this helps

Karthikeya

ErikWetterberg

Another thing you need to verify: if this is on desktop, make sure you save the app.

Erik Wetterberg

d_pranskus
Partner - Creator III
Partner - Creator III

Hi

Possibly you have already sorted this out, but if not, this is what I have discovered.

You mast include tags property in qMetaDef section even if it is empty, like this:

  qMetaDef: {

       tags: []

   }

jonvitale
Creator III
Creator III

Oh, and of course, clear the cache and refresh, right Erik