<?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 Script Assistance on adding a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Assistance-on-adding-a-field/m-p/1154129#M634094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my script, I redefined a field as follows in order to differentiate this date field from others in the dashboard :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date as 'CC_Date'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a week field based on the 'CC_Date'. However, when I use:&lt;/P&gt;&lt;P&gt;Week(CC_Date) as Week,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is coming back as invalid because of my field for week. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jun 2016 12:49:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-20T12:49:43Z</dc:date>
    <item>
      <title>Script Assistance on adding a field</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Assistance-on-adding-a-field/m-p/1154129#M634094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my script, I redefined a field as follows in order to differentiate this date field from others in the dashboard :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date as 'CC_Date'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a week field based on the 'CC_Date'. However, when I use:&lt;/P&gt;&lt;P&gt;Week(CC_Date) as Week,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is coming back as invalid because of my field for week. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 12:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Assistance-on-adding-a-field/m-p/1154129#M634094</guid>
      <dc:creator />
      <dc:date>2016-06-20T12:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Script Assistance on adding a field</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Assistance-on-adding-a-field/m-p/1154130#M634095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't reference your new field CC_Date in the same LOAD statement where you are creating it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the new field in a preceding LOAD&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or reference the original field name:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(CC_Date) as WeekOnNewField;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date as 'CC_Date' ,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(Date) as WeekOnOriginalField,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Date field should show a numeric representation in both cases, to allow the Week() function to work.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2622"&gt;Get the Dates Right&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 13:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Assistance-on-adding-a-field/m-p/1154130#M634095</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-20T13:24:10Z</dc:date>
    </item>
  </channel>
</rss>

