<?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: I have a problem with left join and setting date detween two dates: this is what i write: in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740291#M1048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi arwa, in the first load of matable, if you are grouping by Date, you will retrieve one record per Date, so each row with [Maternité (Évènements)]=1 will have the same value for Date, mindate and maxdate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the second table the Date&amp;gt;maxdate will return always false:&lt;/P&gt;&lt;P&gt;if(IsNull(mindate),2,if(&lt;STRONG&gt;Date&amp;gt;maxdate&lt;/STRONG&gt; and Date&amp;lt;=date(mindate+365),1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If mindate is not null, there will be a maxdate and it can't be lower than Date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2014 08:28:52 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2014-11-28T08:28:52Z</dc:date>
    <item>
      <title>I have a problem with left join and setting date detween two dates: this is what i write:</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740290#M1047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;matable:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;CNI,&lt;/P&gt;&lt;P&gt;[Nom Prénom],&lt;/P&gt;&lt;P&gt;[Maternité (Évènements)],&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;Min(if([Maternité (Évènements)]=1,date(Date))) as mindate,&lt;/P&gt;&lt;P&gt;Max(if([Maternité (Évènements)]=1,date(Date))) as maxdate&lt;/P&gt;&lt;P&gt;Resident Année2013&lt;/P&gt;&lt;P&gt;Group by CNI,[Nom Prénom],[Maternité (Évènements)], Date;&lt;/P&gt;&lt;P&gt;Left Join(matable)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;CNI,&lt;/P&gt;&lt;P&gt;[Nom Prénom],&lt;/P&gt;&lt;P&gt;[Maternité (Évènements)],&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;if(IsNull(mindate),2,if(Date&amp;gt;maxdate and Date&amp;lt;=date(mindate+365),1,0))as valmaternité&lt;/P&gt;&lt;P&gt;Resident matable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result that iwant to have is : if i don't have a min date then give me 2 , if i have a mindate then if date between mindate and mindate+one year then 1 else 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 08:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740290#M1047</guid>
      <dc:creator />
      <dc:date>2014-11-28T08:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: I have a problem with left join and setting date detween two dates: this is what i write:</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740291#M1048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi arwa, in the first load of matable, if you are grouping by Date, you will retrieve one record per Date, so each row with [Maternité (Évènements)]=1 will have the same value for Date, mindate and maxdate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in the second table the Date&amp;gt;maxdate will return always false:&lt;/P&gt;&lt;P&gt;if(IsNull(mindate),2,if(&lt;STRONG&gt;Date&amp;gt;maxdate&lt;/STRONG&gt; and Date&amp;lt;=date(mindate+365),1,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If mindate is not null, there will be a maxdate and it can't be lower than Date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 08:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740291#M1048</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-28T08:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: I have a problem with left join and setting date detween two dates: this is what i write:</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740292#M1049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the first load of matable,i am retrieving all the dates between mindate and maxdate. and if i omit date from field and from groupby ,i have one day for each person who have 1 for [Maternité (Évènements)]. but the if of the left join is not used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if mindate is not null, then for any date between mindate&amp;nbsp; and mindate+oneyear it takes 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 08:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/I-have-a-problem-with-left-join-and-setting-date-detween-two/m-p/740292#M1049</guid>
      <dc:creator />
      <dc:date>2014-11-28T08:46:30Z</dc:date>
    </item>
  </channel>
</rss>

