Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List of measures in dropdown

Hi All, I would like to create a mashup project with dropdown containing all measures. Is it possible and how can I do it?

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

I find a solution. The code below:

app.createGenericObject({ 
  qMeasureListDef : { 
qType: "measure", qData: { title: "/title", tags: "/tags",  "measure": "/qMeasure" } 
  } 
}, function(reply){ 
  var myObject = reply.qMeasureList.qItems; 
  var str = ""; 
  $.each(reply.qMeasureList.qItems, function(key, value) { 
var title = ""; 
var fx = ""; 
var combined = ""; 
title = JSON.stringify(value.qData.measure.qLabel) ; 
title = title.replace(/['"]+/g, '') 
fx = JSON.stringify(value.qData.measure.qDef) ; 
fx = fx.replace(/['"]+/g, '')
$("#dropdownMeasures").append("<li value='" + fx + "'>"  + title + "</li>");
  });

View solution in original post

2 Replies
miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

The only way I see to get what you require is by creating a "Filter pane chart" and adding manually all fields in it.

Regards,

MB

Not applicable
Author

I find a solution. The code below:

app.createGenericObject({ 
  qMeasureListDef : { 
qType: "measure", qData: { title: "/title", tags: "/tags",  "measure": "/qMeasure" } 
  } 
}, function(reply){ 
  var myObject = reply.qMeasureList.qItems; 
  var str = ""; 
  $.each(reply.qMeasureList.qItems, function(key, value) { 
var title = ""; 
var fx = ""; 
var combined = ""; 
title = JSON.stringify(value.qData.measure.qLabel) ; 
title = title.replace(/['"]+/g, '') 
fx = JSON.stringify(value.qData.measure.qDef) ; 
fx = fx.replace(/['"]+/g, '')
$("#dropdownMeasures").append("<li value='" + fx + "'>"  + title + "</li>");
  });