<?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 use an If or When condition in a Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-an-If-or-When-condition-in-a-Variable/m-p/528786#M197681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to make a change to an existing variable so that it only shows results for when 'Status' is 'Active'.&lt;/P&gt;&lt;P&gt;This is the variable: sum&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counter_Interviews]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*4)/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Planner&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;At the moment this formula taking all interviews, dividing them by 4 and then dividing them again by the number of planners. What I want it do to is to only take interviews for planners who have an 'Active' status, divide this by 4, and then divide this by the number of planners with an 'active' status. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2013 02:05:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-17T02:05:29Z</dc:date>
    <item>
      <title>How to use an If or When condition in a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-an-If-or-When-condition-in-a-Variable/m-p/528786#M197681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to make a change to an existing variable so that it only shows results for when 'Status' is 'Active'.&lt;/P&gt;&lt;P&gt;This is the variable: sum&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counter_Interviews]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)*4)/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Planner&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;At the moment this formula taking all interviews, dividing them by 4 and then dividing them again by the number of planners. What I want it do to is to only take interviews for planners who have an 'Active' status, divide this by 4, and then divide this by the number of planners with an 'active' status. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 02:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-an-If-or-When-condition-in-a-Variable/m-p/528786#M197681</guid>
      <dc:creator />
      <dc:date>2013-09-17T02:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use an If or When condition in a Variable</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-an-If-or-When-condition-in-a-Variable/m-p/528787#M197682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can try this&lt;/P&gt;&lt;P&gt;(Sum({$&amp;lt;Status={'Active'}&amp;gt;} [Counter_Interviews])/4)/&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;Status={'Active'}&amp;gt;} Distinct Planner) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 02:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-an-If-or-When-condition-in-a-Variable/m-p/528787#M197682</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2013-09-17T02:13:31Z</dc:date>
    </item>
  </channel>
</rss>

