<?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 How to do a calculation on string? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16051#M2614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlik Enthusiasts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on improving the performance of a dashboard. I am getting stuck at the below scenario;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(Distinct{&amp;lt;Geography = , Level={0})&amp;gt;}) / sum(&lt;SPAN style="font-size: 13.3333px;"&gt;Distinct{&amp;lt;Geography = , Level={1,2}&lt;/SPAN&gt;)&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am taking them as string by putting single quotes and storing in a variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPerformanceExpr = '&lt;SPAN style="font-size: 13.3333px;"&gt;Count(Distinct{&amp;lt;Geography = , Level={0})&amp;gt;})' / 'sum(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Distinct{&amp;lt;Geography = , Level={1,2}&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&amp;gt;}'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;When I call the above variable it ain't working. However both the strings are working separately. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2018 10:11:44 GMT</pubDate>
    <dc:creator>amijit_hazarika</dc:creator>
    <dc:date>2018-04-25T10:11:44Z</dc:date>
    <item>
      <title>How to do a calculation on string?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16051#M2614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlik Enthusiasts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on improving the performance of a dashboard. I am getting stuck at the below scenario;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(Distinct{&amp;lt;Geography = , Level={0})&amp;gt;}) / sum(&lt;SPAN style="font-size: 13.3333px;"&gt;Distinct{&amp;lt;Geography = , Level={1,2}&lt;/SPAN&gt;)&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am taking them as string by putting single quotes and storing in a variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPerformanceExpr = '&lt;SPAN style="font-size: 13.3333px;"&gt;Count(Distinct{&amp;lt;Geography = , Level={0})&amp;gt;})' / 'sum(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Distinct{&amp;lt;Geography = , Level={1,2}&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&amp;gt;}'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;When I call the above variable it ain't working. However both the strings are working separately. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 10:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16051#M2614</guid>
      <dc:creator>amijit_hazarika</dc:creator>
      <dc:date>2018-04-25T10:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a calculation on string?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16052#M2615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting = in front of count&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 11:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16052#M2615</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2018-04-25T11:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a calculation on string?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16053#M2616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am confused, what are you counting and summing here? You don't have any field within Count and Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200755_Capture.PNG" style="height: 64px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 11:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-a-calculation-on-string/m-p/16053#M2616</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-25T11:58:51Z</dc:date>
    </item>
  </channel>
</rss>

