<?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: Assign value if filled cell otherwise none in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874501#M660969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can also use it in chart expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2015 09:31:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-08T09:31:16Z</dc:date>
    <item>
      <title>Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874498#M660966</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 problem which I cannot solve by myself. &lt;SPAN style="font-size: 13.3333330154419px;"&gt;I need to assign a character ('x') in 'header 3' if the first field contains an abbreviation that is A, AA or AAA. (I know I can do this with left join, but I need to do it in combination with the upcoming problem). In addition, &lt;/SPAN&gt;I need to assign a character ('x') to 'header 4' if the field 'Value' is not empty. There is no way for me to write all names in a script, because there are in reality 1 million rows with new names added continuously. This is just an example. Below you can see this illustrated.&lt;/P&gt;&lt;P&gt;&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;Abbreviation&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;Value&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;Header 3&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;Header 4&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;Header 5&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AAA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;TRS20140202&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EGM20140312&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20140606&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BBB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;EGM20140311&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, if the first cell contains A, AA or AAA, 'x' is displayed in header 3. However, I also want 'x' to be displayed in header 4 if the field Value contains something (i.e., not empty).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my purpose here is actually to get header 5. If either of the first two fields or both fields meet the above mentioned criteria, I want something to be displayed. In this case 'x'. Otherwise the cell should remain empty. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874498#M660966</guid>
      <dc:creator />
      <dc:date>2015-04-08T09:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874499#M660967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for header 4 use&lt;/P&gt;&lt;P&gt;if len(Value)&amp;gt;0,'X')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for header 5&lt;/P&gt;&lt;P&gt;if (left(Abbreviation,1)=A) and (len(Value)&amp;gt;0),'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874499#M660967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-08T09:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874500#M660968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can write something &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (len(Abbreviation)&amp;gt;0,'X',' ') as [Header 5]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same as for header 3 just change the if condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874500#M660968</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-08T09:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874501#M660969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can also use it in chart expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874501#M660969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-08T09:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874502#M660970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add the conditions as a preceding load statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have millions of values and you only want A, AA or AAA, I'd use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;Match&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Abbreviation&lt;/SPAN&gt;, 'A', 'AA', 'AAA'), 'x',) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Header3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;to ensure you don't pick up any other values that could start with an A etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;As stated in the other answers, your:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;)&amp;gt;0, 'x',) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Header4 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;should work. Combine them both in an if(... or...) statement to get Header5.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874502#M660970</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-04-08T09:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Assign value if filled cell otherwise none</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874503#M660971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rudolf and balkumarchandel! Both of your answers helped me get the correct output!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 09:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-value-if-filled-cell-otherwise-none/m-p/874503#M660971</guid>
      <dc:creator />
      <dc:date>2015-04-08T09:36:01Z</dc:date>
    </item>
  </channel>
</rss>

