<?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: Variable based on If condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842517#M296073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... and to put an end to all my demands &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;, i need to show a chart for customer satisfaction linked to Codification A and a second chart linked to codification B &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2015 17:36:52 GMT</pubDate>
    <dc:creator>guillaume_gorli</dc:creator>
    <dc:date>2015-04-28T17:36:52Z</dc:date>
    <item>
      <title>Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842511#M296067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to build an app regarding customer satisfaction for which i will need some help.&lt;/P&gt;&lt;P&gt;The idea is to determine wether a customer is satisfied because delivered on time. The trick is that i have on my database, key part numbers that have to be delivered very quickly and others that have to be delivered the normal way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have then a test database with basic informations :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Part number&lt;/LI&gt;&lt;LI&gt;Codification that determined wether part number has to be delivered urgently or not&lt;/LI&gt;&lt;LI&gt;Order number&lt;/LI&gt;&lt;LI&gt;Order creation date&lt;/LI&gt;&lt;LI&gt;Customer requested date&lt;/LI&gt;&lt;LI&gt;Invoicing date&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/85270_Capture.JPG" style="height: 240px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First issue is that i have to determine a leadtime &lt;SPAN style="text-decoration: underline;"&gt;based on the codification&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If part number is linked to codification A, then the customer leadtime is invoicing date versus order creation date&lt;/P&gt;&lt;P&gt;If part number is linked to codification B, then the customer leadtime is invoicing date versus customer requested date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the output of such criteria should be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/85269_Capture.JPG" style="height: 200px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second step is is to determine directly from the app wether the customer is satisfied or not. The rule to apply is that the customer is satisfied&amp;nbsp; if the leadtime is less than or equal to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the output of such criteria should be : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/85271_Capture.JPG" style="height: 173px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that i have to set up variables based on a condition like IF formula in excel but i am stuck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is test database as well as .qvw app for those who want to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 16:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842511#M296067</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T16:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842512#M296068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If([Customer leadtime] &amp;lt;= 0, 'Yes', 'No') as [Customer Satisfied];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Part number], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Codification, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Order creation date], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer requested date], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Invoicing date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Codification = 'A', [Invoicing date] - [Order creation date], [Invoicing date] - [Customer requested date]) as [Customer leadtime]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Customer satisfaction TEST .xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Feuil1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also attaching the qvw file (PFA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 16:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842512#M296068</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-28T16:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842513#M296069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Sunny, this is just perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One last thing : how would you do to make the customer satisfaction indicator to be show in a chart as below ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85273_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842513#M296069</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T17:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842514#M296070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this as an expression with no dimension for a bar chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Num(Count({&amp;lt;[Customer Satisfied] = {'Yes'}&amp;gt;} [Customer Satisfied])/Count([Customer Satisfied]), '###0,00%')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also find attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842514#M296070</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-28T17:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842515#M296071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the chart you produced is showing wrong results : 54,55 % vs 60 % &lt;/P&gt;&lt;P&gt;(in the example, customer is satisfied 6 times as per 10 orders sample which then makes a 60 % ratio)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85277_Capture.JPG" style="height: 467px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842515#M296071</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T17:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842516#M296072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are actually 11 orders in your sample (6 Yes and 5 No).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842516#M296072</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-28T17:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842517#M296073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... and to put an end to all my demands &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;, i need to show a chart for customer satisfaction linked to Codification A and a second chart linked to codification B &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842517#M296073</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T17:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842518#M296074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are absolutely right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842518#M296074</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842519#M296075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add Codification as a dimension to the chart I just made. (PFA) &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842519#M296075</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-28T17:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842520#M296076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help Sunny. This help me a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 17:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842520#M296076</guid>
      <dc:creator>guillaume_gorli</dc:creator>
      <dc:date>2015-04-28T17:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variable based on If condition</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842521#M296077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem. Pleasure is all mine &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 18:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-based-on-If-condition/m-p/842521#M296077</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-28T18:19:19Z</dc:date>
    </item>
  </channel>
</rss>

