<?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 compare two sets of records from two different years-Month to date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762639#M718276</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dashboard - Qlik Issue E.permanent.JPG" style="width: 641px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/44389iBDA6309E2C8567DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dashboard - Qlik Issue E.permanent.JPG" alt="Dashboard - Qlik Issue E.permanent.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what i want to do about this data set is the following one&lt;/P&gt;&lt;P&gt;If the sameID appears in the previous year and month&amp;nbsp; with value &amp;gt;0 and appear also in current year with the previous month as well with value &amp;gt; 0 then it gets '1' in the column permanent staff.&lt;/P&gt;&lt;P&gt;I would like to do it in the script just to have a brand new column permanent staff but i don't know how i could do that ?&lt;/P&gt;&lt;P&gt;So basically it's&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID = Previous(ID) and Previous(Value) &amp;gt; 0 and Value &amp;gt;0 and Current Year &amp;amp; Month number compare to previous year with the exact same month number&lt;/P&gt;&lt;P&gt;Anyone can help me ?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:36:40 GMT</pubDate>
    <dc:creator>lessassy</dc:creator>
    <dc:date>2024-11-15T23:36:40Z</dc:date>
    <item>
      <title>compare two sets of records from two different years-Month to date</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762639#M718276</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello everyone ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dashboard - Qlik Issue E.permanent.JPG" style="width: 641px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/44389iBDA6309E2C8567DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dashboard - Qlik Issue E.permanent.JPG" alt="Dashboard - Qlik Issue E.permanent.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what i want to do about this data set is the following one&lt;/P&gt;&lt;P&gt;If the sameID appears in the previous year and month&amp;nbsp; with value &amp;gt;0 and appear also in current year with the previous month as well with value &amp;gt; 0 then it gets '1' in the column permanent staff.&lt;/P&gt;&lt;P&gt;I would like to do it in the script just to have a brand new column permanent staff but i don't know how i could do that ?&lt;/P&gt;&lt;P&gt;So basically it's&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID = Previous(ID) and Previous(Value) &amp;gt; 0 and Value &amp;gt;0 and Current Year &amp;amp; Month number compare to previous year with the exact same month number&lt;/P&gt;&lt;P&gt;Anyone can help me ?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762639#M718276</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2024-11-15T23:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: compare two sets of records from two different years-Month to date</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762779#M718277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14277"&gt;@lessassy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try like below&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;ID, Year, Month, Value&lt;BR /&gt;180, 2019, 1, 55&lt;BR /&gt;181, 2019, 2, 0&lt;BR /&gt;182, 2019, 3, 65&lt;BR /&gt;183, 2019, 4, 0&lt;BR /&gt;184, 2019, 5, 65&lt;BR /&gt;180, 2020, 1, 58&lt;BR /&gt;181, 2020, 2, 87&lt;BR /&gt;182, 2020, 3, 47&lt;BR /&gt;183, 2020, 4, 88&lt;BR /&gt;184, 2020, 5, 89&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Load *, if(ID = Previous(ID) and Year = Previous(Year)+1 and Month = Previous(Month) and Value &amp;gt;0 and Previous(Value)&amp;gt;0, 1, 0) as PermanentStaff&lt;BR /&gt;Resident Temp order by ID, Year, Month;&lt;/P&gt;&lt;P&gt;DROP Table Temp;&lt;/P&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MayilVahanan_0-1605770117365.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/44421i43F5EA2ECEA9F809/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MayilVahanan_0-1605770117365.png" alt="MayilVahanan_0-1605770117365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 07:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762779#M718277</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-11-19T07:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: compare two sets of records from two different years-Month to date</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762844#M718278</link>
      <description>&lt;P&gt;Thanks for your answer. I don't understand the year = previous(year)+1 because the other fields are writen this way:&lt;/P&gt;&lt;P&gt;Field = previous(FIeld).&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 10:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762844#M718278</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2020-11-19T10:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: compare two sets of records from two different years-Month to date</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762889#M718279</link>
      <description>&lt;P&gt;And when i use your script for some reason i get zero value when i apply it to my values.&lt;/P&gt;&lt;P&gt;TEMP_EFF_PERMANENT:&lt;BR /&gt;NoConcatenate LOAD&lt;BR /&gt;ANNEE,&lt;BR /&gt;MOIS,&lt;BR /&gt;MATRICULE,&lt;BR /&gt;EFF_FINMOIS&lt;/P&gt;&lt;P&gt;Resident V_DWHRH_RH_EFF_PERMANENT;&lt;BR /&gt;DROP TABLE [V_DWHRH_RH_EFF_PERMANENT];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EFF_PERMANENT:&lt;BR /&gt;NoConcatenate Load *,&lt;BR /&gt;if(MATRICULE = Previous(MATRICULE) and ANNEE = Previous(ANNEE)+1&lt;BR /&gt;and MOIS = Previous(MOIS) and EFF_FINMOIS &amp;gt;0 and Previous(EFF_FINMOIS)&amp;gt;0, 1, 0) as PermanentStaff&lt;BR /&gt;Resident TEMP_EFF_PERMANENT&lt;BR /&gt;Order by ANNEE, MOIS, MATRICULE;&lt;/P&gt;&lt;P&gt;DROP TABLE TEMP_EFF_PERMANENT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when i put it in a where clause i get no values.&lt;/P&gt;&lt;P&gt;Idon't understand why it doesn't work.&lt;/P&gt;&lt;P&gt;Could you help me please ? Thanks.&lt;/P&gt;&lt;P&gt;I think it doesn't recognize the previous year&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 11:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-sets-of-records-from-two-different-years-Month-to/m-p/1762889#M718279</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2020-11-19T11:37:24Z</dc:date>
    </item>
  </channel>
</rss>

