<?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: Adding a column in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572599#M597181</link>
    <description>&lt;P&gt;im not sure how all of the data looks like and how new data will look in the future, but what i can think of now is to create a mapping file with three columns, description, count and new column.&lt;/P&gt;&lt;P&gt;You manually add the details of the new column accordingly and left join it to the main table.&lt;/P&gt;&lt;P&gt;I hope this makes sense Emma, else please let us know.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 10:13:30 GMT</pubDate>
    <dc:creator>arpitkharkia</dc:creator>
    <dc:date>2019-04-24T10:13:30Z</dc:date>
    <item>
      <title>Adding a column in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572541#M597178</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;My query is pretty straight forward, I have the following table as input and would like to add a colum &lt;STRONG&gt;in the script while loading data in Qlikview.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Picture of data below) Please note that the input data cannot be changed at the source.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INPUT DATA:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 281px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10768i2AC89879F27C8874/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My goal is to add a column&lt;STRONG&gt; in the script&lt;/STRONG&gt; that will rewrite the same description IF the Count =0 for every unique ID.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The data should look like this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 372px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10769i2DEC2542FF95C7C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The nulls in New_Column can be replaced by something else like a number as long as it's different from the Description value.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 08:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572541#M597178</guid>
      <dc:creator>Emma</dc:creator>
      <dc:date>2019-04-24T08:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572545#M597179</link>
      <description>&lt;P&gt;Add the following column&lt;/P&gt;&lt;P&gt;if(count=0,Description)&amp;nbsp; as&amp;nbsp; New_column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 08:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572545#M597179</guid>
      <dc:creator>arpitkharkia</dc:creator>
      <dc:date>2019-04-24T08:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572553#M597180</link>
      <description>&lt;P&gt;Hi Arpitkharkia&lt;/P&gt;&lt;P&gt;Thanks for the reply. Apologies I forgot to mention a critical detail. Some of the data looks like the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.JPG" style="width: 239px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10771iC148A98F6D9893F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Your approach will make it look like this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 330px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10772iD7A17DE1B394D3FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Instead of the desired result, which is this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 330px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10770i61D0C15B8E7E041E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If there is a method to replace all the "Count" that have 0 with the first "Description" that has a count=0, that would solve the issue.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 09:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572553#M597180</guid>
      <dc:creator>Emma</dc:creator>
      <dc:date>2019-04-24T09:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a column in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572599#M597181</link>
      <description>&lt;P&gt;im not sure how all of the data looks like and how new data will look in the future, but what i can think of now is to create a mapping file with three columns, description, count and new column.&lt;/P&gt;&lt;P&gt;You manually add the details of the new column accordingly and left join it to the main table.&lt;/P&gt;&lt;P&gt;I hope this makes sense Emma, else please let us know.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 10:13:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-column-in-Script/m-p/1572599#M597181</guid>
      <dc:creator>arpitkharkia</dc:creator>
      <dc:date>2019-04-24T10:13:30Z</dc:date>
    </item>
  </channel>
</rss>

