<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Reusing Qlik Sense Charts by Passing Parameters in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Reusing-Qlik-Sense-Charts-by-Passing-Parameters/m-p/992390#M14546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Q)&lt;/STRONG&gt; How can we render the same chart multiple times in our mashup, so that the passed parameter only affects the one I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are building an embedded solution with &lt;EM&gt;Qlik Sense&lt;/EM&gt; using the Mashup API.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Example of Natural Reuse:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Chart: "Contacted Rate Within 1 Hours"&lt;/LI&gt;&lt;LI&gt;Chart: "Contacted Rate Within 2 Hours"&lt;/LI&gt;&lt;LI&gt;Chart: "Contacted Rate Within 24 Hours"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd rather create 1 chart, that accepts an hour variable:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Chart: "Contacted Rate Within X Hours"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This problem lends itself so naturally to code (or chart measure expression) reuse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be achieved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Nov 2024 10:59:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2024-11-16T10:59:14Z</dc:date>
    <item>
      <title>Reusing Qlik Sense Charts by Passing Parameters</title>
      <link>https://community.qlik.com/t5/App-Development/Reusing-Qlik-Sense-Charts-by-Passing-Parameters/m-p/992390#M14546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Q)&lt;/STRONG&gt; How can we render the same chart multiple times in our mashup, so that the passed parameter only affects the one I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are building an embedded solution with &lt;EM&gt;Qlik Sense&lt;/EM&gt; using the Mashup API.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Example of Natural Reuse:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Chart: "Contacted Rate Within 1 Hours"&lt;/LI&gt;&lt;LI&gt;Chart: "Contacted Rate Within 2 Hours"&lt;/LI&gt;&lt;LI&gt;Chart: "Contacted Rate Within 24 Hours"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd rather create 1 chart, that accepts an hour variable:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Chart: "Contacted Rate Within X Hours"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This problem lends itself so naturally to code (or chart measure expression) reuse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be achieved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:59:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reusing-Qlik-Sense-Charts-by-Passing-Parameters/m-p/992390#M14546</guid>
      <dc:creator />
      <dc:date>2024-11-16T10:59:14Z</dc:date>
    </item>
  </channel>
</rss>

