<?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: How can I create field  from multiple dates ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956051#M645086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Ronny's Code, you can also do this if Dates are not true nulls and may have some invisible blank spaces in them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(Len(Trim(DATE_1)) &amp;gt; 0, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_2)) &amp;gt; 0, 2) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_4)) &amp;gt; 0, 4) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_6)) &amp;gt; 0, 6) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_7)) &amp;gt; 0, 7) as&lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;STRONG&gt; NEW_STATE_STORE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 23:59:18 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-11-06T23:59:18Z</dc:date>
    <item>
      <title>How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956048#M645083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 5 dates. DATE_1 .. DATE_7.&lt;/P&gt;&lt;P&gt;I want to create field like that contains 12467&lt;/P&gt;&lt;P&gt;IF DATE_1 NOT NULL 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;IF DATE_2 NOT NULL 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;IF DATE_4 NOT NULL 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;IF DATE_6 NOT NULL 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;IF DATE_7 NOT NULL 7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Exemple : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;STORE_ID , DATE_1, DATE_2, DATE_4, DATE_6, DATE_7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;XXXX, 12/04/2015, 14/05/2015,,18/06/2015,23/06/2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create field STORE_STATE that contains 4 values : 1267&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;53662LT001,16/12/2015,06/10/2015,,,&amp;nbsp; : the field state_store contains 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 21:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956048#M645083</guid>
      <dc:creator />
      <dc:date>2015-11-06T21:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956049#M645084</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 am not sure what you are trying to acheive based on your script. But if it is what you say in the text you can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Replace LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Not IsNull(DATE_1),1) &amp;amp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Not IsNull(DATE_2),2) &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Not IsNull(DATE_4),4) &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Not IsNull(DATE_6),6) &amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(Not IsNull(DATE_7),7)&lt;/P&gt;&lt;P&gt;&amp;nbsp; AS NEW_STATE_STORE&lt;/P&gt;&lt;P&gt;Resident Sheet1$;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UNQUALIFY *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I have not access to your source file I just added the code above and took a partial reload based on the data you had in the app. It seems to work. You don't need the qualify commands nor the Replace load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the code you can test with a partial reload.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 22:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956049#M645084</guid>
      <dc:creator>ronnywaage</dc:creator>
      <dc:date>2015-11-06T22:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956050#M645085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(not isNull(DATE_1),1) &amp;amp; if(not isNull(DATE_2),2) &amp;amp; if(not isNull(DATE_4),4) &amp;amp; if(not isNull(DATE_6),6) &amp;amp; if(not isNull(DATE_7),7) as NewField&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 22:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956050#M645085</guid>
      <dc:creator>cwolf</dc:creator>
      <dc:date>2015-11-06T22:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956051#M645086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Ronny's Code, you can also do this if Dates are not true nulls and may have some invisible blank spaces in them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(Len(Trim(DATE_1)) &amp;gt; 0, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_2)) &amp;gt; 0, 2) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_4)) &amp;gt; 0, 4) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_6)) &amp;gt; 0, 6) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Len(Trim&lt;/SPAN&gt;(DATE_7)) &amp;gt; 0, 7) as&lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;STRONG&gt; NEW_STATE_STORE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 23:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956051#M645086</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-06T23:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956052#M645087</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;maybe also possible:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14468580423283049" jivemacro_uid="_14468580423283049"&gt;
&lt;P&gt;If(DATE_1,1)&amp;amp;If(DATE_2,2)&amp;amp;If(DATE_4,4)&amp;amp;If(DATE_6,6)&amp;amp;If(DATE_7,7) as STORE_STATE;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Nov 2015 01:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956052#M645087</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-11-07T01:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956053#M645088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or more generic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14468581207918219 jive_text_macro" jivemacro_uid="_14468581207918219"&gt;
&lt;P&gt;table2:&lt;/P&gt;
&lt;P&gt;CrossTable (colnam, colval,2)&lt;/P&gt;
&lt;P&gt;LOAD STORE_ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_4,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_6,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE_7&lt;/P&gt;
&lt;P&gt;Resident table1;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;table3:&lt;/P&gt;
&lt;P&gt;LOAD STORE_ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Concat(SubField(colnam,'_',2)) as STORE_STATE&lt;/P&gt;
&lt;P&gt;Resident table2&lt;/P&gt;
&lt;P&gt;Where Len(colval)&lt;/P&gt;
&lt;P&gt;Group By STORE_ID,DATE;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table table2;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Nov 2015 01:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956053#M645088</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-11-07T01:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create field  from multiple dates ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956054#M645089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thank guys for your reply.&lt;/P&gt;&lt;P&gt;But How can I create a calendar state like my attachment ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Nov 2015 10:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-create-field-from-multiple-dates/m-p/956054#M645089</guid>
      <dc:creator />
      <dc:date>2015-11-07T10:53:54Z</dc:date>
    </item>
  </channel>
</rss>

