<?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: if statement based on calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392228#M807096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;go to settings, variable overview&lt;/P&gt;&lt;P&gt;and create the new variable with your needs.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Schermata 2017-10-18 alle 17.04.49.png" class="jive-image image-1" src="/legacyfs/online/180106_Schermata 2017-10-18 alle 17.04.49.png" style="height: 540px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;hope this&amp;nbsp; help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2017 15:08:10 GMT</pubDate>
    <dc:creator>matteo_mi</dc:creator>
    <dc:date>2017-10-18T15:08:10Z</dc:date>
    <item>
      <title>if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392226#M807094</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;I have a simple if statement which seem to be not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to create a new variable, which based on the results of 'Count' will assign a value to another one. If the count is 0, the value is D, otherwise it is A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(COUNT([X_1])=' ','D','A') AS Var1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is not working. What is the correct way of doing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt;"&gt;EDIT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to elaborate more on my question. I have 2 tables, which looks like this:&lt;/P&gt;&lt;P&gt;Table TD&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="167" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 798px; height: 167px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline;" valign="middle"&gt;&lt;STRONG&gt;CID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px; font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;STRONG&gt;OID&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x53&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; color: #000000; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3&lt;/TD&gt;&lt;TD style="color: #000000; text-align: left; padding: 2px; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;x62&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other table, looks like this:&lt;/P&gt;&lt;P&gt;Table CD&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;CID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;CNAME&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;John Smith&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Max Mustermann&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Edith Bingo&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Albert Reckel&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Sam Retro&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Teno&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want to do, is to generate a new column for the 2nd table, which is based on the count of OID in the 1st table, i.e., this column should calculate, if count(OID) is NULL, the value should be D, else it should be A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how my I try to do the left join at the moment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (CD)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;IF(COUNT([OID])=0,'Dormant','Active') AS Var1&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident TD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this new Var1 variable, will be used in a plot afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this make things more clear now?&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/if-statement-based-on-calculation/m-p/1392226#M807094</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392227#M807095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(COUNT(X_1)=0,'D','A') AS Var1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392227#M807095</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-18T15:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392228#M807096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;go to settings, variable overview&lt;/P&gt;&lt;P&gt;and create the new variable with your needs.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Schermata 2017-10-18 alle 17.04.49.png" class="jive-image image-1" src="/legacyfs/online/180106_Schermata 2017-10-18 alle 17.04.49.png" style="height: 540px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;hope this&amp;nbsp; help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392228#M807096</guid>
      <dc:creator>matteo_mi</dc:creator>
      <dc:date>2017-10-18T15:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392229#M807097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Abdullah,&lt;/P&gt;&lt;P&gt;You cannot assign values to variables with 'AS' key word. It should be either 'LET' or 'SET'. You can also use variable overview tab to create new variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392229#M807097</guid>
      <dc:creator>madhumitha</dc:creator>
      <dc:date>2017-10-18T15:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392230#M807098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 07:52:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392230#M807098</guid>
      <dc:creator />
      <dc:date>2017-10-19T07:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392231#M807099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im not assigning a value to a variable, I want the value to be calculated in the script based on this condition. Then I want to use this value for plotting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 08:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392231#M807099</guid>
      <dc:creator />
      <dc:date>2017-10-19T08:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392232#M807100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I then use this variable in a plot? will it adjust automatically to the dimension I use for the plot (e.g., the count for each ID should not be 0)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 08:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392232#M807100</guid>
      <dc:creator />
      <dc:date>2017-10-19T08:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392233#M807101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah,&lt;/P&gt;&lt;P&gt;to use variable in this he script you should use&amp;nbsp; SET or LET as explained above by Madhu Mitha.&lt;/P&gt;&lt;P&gt;Maybe what you are trying to accomplish have to be done in other way, so if you want you can&lt;/P&gt;&lt;P&gt;explain more in detail what is your goal posting an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 08:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392233#M807101</guid>
      <dc:creator>matteo_mi</dc:creator>
      <dc:date>2017-10-19T08:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392234#M807102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not quite clear what you are trying to do. Do you want check if this field-value is empty, NULL or contained a white-space then you need a check on the lenght, for example len(X_1) = 1 or len(trim(X_1)) = 0 or do you want to count the fieldvalues and check these amounts with something like &amp;gt;= AnyNumber. To count fieldvalues within a load meant you need to use an aggregation load with group by.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 08:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392234#M807102</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-10-19T08:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392235#M807103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to do this in your load script, then follow these steps. We are assuming that &lt;SPAN style="font-family: 'courier new', courier;"&gt;X_1&lt;/SPAN&gt; is a column in a resident table called (for example) &lt;SPAN style="font-family: 'courier new', courier;"&gt;Table_1&lt;/SPAN&gt;. If the table has a different name, then change the code accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Table_Count_X_1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD IF (Count(X_1)=0, 'D', 'A') AS Flag_X_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT Table_1; // Modify if resident table has a different name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET Var1 = Peek('Flag_X_1'); // Var1 now contains either D or A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Table Table_Count_X_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to count the number of unique values in &lt;SPAN style="font-family: 'courier new', courier;"&gt;X_1&lt;/SPAN&gt;, then add a &lt;SPAN style="font-family: 'courier new', courier;"&gt;DISTINCT&lt;/SPAN&gt; keyword before &lt;SPAN style="font-family: 'courier new', courier;"&gt;X_1&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 09:02:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392235#M807103</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-19T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392236#M807104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how can I then use Var1 for plotting? I cannot find it in the variable list&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 09:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392236#M807104</guid>
      <dc:creator />
      <dc:date>2017-10-19T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392237#M807105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I updated my question. Maybe this explains more what I exactly need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 09:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392237#M807105</guid>
      <dc:creator />
      <dc:date>2017-10-19T09:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392238#M807106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not mix this in your JOIN. Because you want to load a variable (can contain one value in two formats, nothing more) you have to calculate the count outside of everything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do not change your requirement halfway in the discussion, as you will make an entire thread useless. Many people spend their time trying to help you, and time is never a free resource for them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 09:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392238#M807106</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-19T09:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392239#M807107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wasnt clear from the beginning, im sorry, I updated my question and made it more clear now. How can this be doable with qlikview?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 09:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392239#M807107</guid>
      <dc:creator />
      <dc:date>2017-10-19T09:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392240#M807108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your changed requirement has to be implemented in a different way. You are now asking for a Count() calculated &lt;EM&gt;per CID value&lt;/EM&gt;. You can't use a variable for that, as a variable can only contain a single value (in two formats).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A JOIN like you propose brings an additional problem. CIDs that are not present in table TD will create a NULL value instead of value 'A'. So we have to resort to a trick that uses a mapping table and a call to ApplyMap. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MapCID2Count:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MAPPING&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD DISTINCT CID, 'Active' AS Result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT TD&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LEFT JOIN(CD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD DISTINCT CID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('MapCID2Count', CID, 'Dormant') AS Var1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT CD;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 10:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392240#M807108</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-19T10:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392241#M807109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this way, you can't use aggr function count in the load script you have to use group by though then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IF( [X_1] = ' ' and Len(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[X_1]&lt;/SPAN&gt;)=0 and isnull(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[X_1]&lt;/SPAN&gt;) = -1,'D','A') AS Var1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From ......&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 10:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392241#M807109</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-10-19T10:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: if statement based on calculation</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392242#M807110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdullah,&lt;/P&gt;&lt;P&gt;Maybe:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CID, OID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, x12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, x23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, x32&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, x41&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, x53&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, x62&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MappingCount:&lt;/P&gt;&lt;P&gt;Mapping&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Distinct&lt;/P&gt;&lt;P&gt;CID,&lt;/P&gt;&lt;P&gt;'A'&lt;/P&gt;&lt;P&gt;Resident Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;ApplyMap('MappingCount',CID,'D') as NewDim;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CID, CNAME&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, John Smith&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, Max Mustermann&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, Edith Bingo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, Albert Reckel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, Sam Retro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, Teno&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;giving the Table2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;CID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;CNAME&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;NewDim&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;John Smith&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Max Mustermann&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Edith Bingo&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Albert Reckel&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;D&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Sam Retro&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;D&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Teno&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;D&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 11:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-based-on-calculation/m-p/1392242#M807110</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-10-19T11:04:26Z</dc:date>
    </item>
  </channel>
</rss>

