<?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 Re: Substitute a variable into an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136540#M911291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=A-AD;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;eCHMetricEncounterCNT&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= Count(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[PatientEncounterID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) - NullCount(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;eCHMetricMedian&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=Median(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetric&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=Door to Admit Throughput; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 19:41:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-06-06T19:41:44Z</dc:date>
    <item>
      <title>Substitute a variable into an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136539#M911290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: arial,helvetica,sans-serif;"&gt;In what I have below, how do I substitute the value of vCHMetricToUse into &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #575757; font-family: 'Courier New';"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"&gt;eCHMetricEncounterCNT and eCHMetricMedian&lt;/SPAN&gt; ?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt; Set&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=A-AD;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;eCHMetricEncounterCNT&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;= Count(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[PatientEncounterID]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) - NullCount(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[A-AD]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;);&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;eCHMetricMedian&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=Median(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;[A-AD]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;);&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9pt; font-family: 'Courier New';"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;vCHMetric&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=Door to Admit Throughput;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Thanks in Advance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136539#M911290</guid>
      <dc:creator>jimgibson</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Substitute a variable into an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136540#M911291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=A-AD;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;eCHMetricEncounterCNT&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= Count(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[PatientEncounterID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) - NullCount(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;eCHMetricMedian&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=Median(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetricToUse&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Set&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;vCHMetric&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=Door to Admit Throughput; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 19:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136540#M911291</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-06T19:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Substitute a variable into an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136541#M911292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did not work or at least when I tried to use it by setting the text in a text object as &lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(eCHMetricMedian) &lt;/EM&gt;&lt;/STRONG&gt; I get nothing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136541#M911292</guid>
      <dc:creator>jimgibson</dc:creator>
      <dc:date>2016-06-06T20:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Substitute a variable into an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136542#M911293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the replacement to happen when the script executes, you can use a dollar sign expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vCHMetricToUse=A-AD;&lt;/P&gt;&lt;P&gt;Set eCHMetricEncounterCNT= Count([PatientEncounterID]) - NullCount([&lt;STRONG&gt;$(vCHMetricToUse)&lt;/STRONG&gt;]);&lt;/P&gt;&lt;P&gt;Set eCHMetricMedian=Median([&lt;STRONG&gt;$(vCHMetricToUse)&lt;/STRONG&gt;]);&lt;/P&gt;&lt;P&gt;Set vCHMetric=Door to Admit Throughput; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need the replacement to happen in the front end (i.e. you want to change vCHMetricToUse also in the front end, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Set vCHMetricToUse=A-AD;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LET eCHMetricEncounterCNT= 'Count([PatientEncounterID]) - NullCount([$' &amp;amp; '(vCHMetricToUse)])';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LET eCHMetricMedian='Median([' &amp;amp; '$(vCHMetricToUse)])';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Set vCHMetric=Door to Admit Throughput; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;OR&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Set vCHMetricToUse=A-AD;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LET eCHMetricEncounterCNT= Replace('Count([PatientEncounterID]) - NullCount([@(vCHMetricToUse)])','@','$');&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LET eCHMetricMedian= Replace('Median([@(vCHMetricToUse)])','@','$');&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Set vCHMetric=Door to Admit Throughput; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3444"&gt;The Magic of Dollar Expansions&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/7455"&gt;Stop Dollar Sign Expansion in the script (Escape Character ??? )&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substitute-a-variable-into-an-expression/m-p/1136542#M911293</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-06T20:50:08Z</dc:date>
    </item>
  </channel>
</rss>

