0 Replies Latest reply: Oct 15, 2015 9:40 PM by Michael Jew RSS

    Reusing Qlik Sense Charts by Passing Parameters

      Q) How can we render the same chart multiple times in our mashup, so that the passed parameter only affects the one I want.

       

      We are building an embedded solution with Qlik Sense using the Mashup API.  We want to build a chart (KPI, Line Graph, etc) where the Measure expression accepts a variable so that we can reuse the same set analysis expression, but accept different parameters, and thus render the exact same chart (via objectId) in the same mashup host page.

       

      While it might be an option to create multiple separate charts, each with there own objectId, we wish to explore the DRY principle (Don't Repeat Yourself).

       

      Example of Natural Reuse:

      • Chart: "Contacted Rate Within 1 Hours"
      • Chart: "Contacted Rate Within 2 Hours"
      • Chart: "Contacted Rate Within 24 Hours"

       

      We'd rather create 1 chart, that accepts an hour variable:

      • Chart: "Contacted Rate Within X Hours"

       

      This problem lends itself so naturally to code (or chart measure expression) reuse.

       

      How can this be achieved?

       

      Thank you very much,

      Michael