<?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 Date &amp;amp; Year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1906365#M74712</link>
    <description>&lt;P&gt;I have a table that has the following columns&lt;/P&gt;
&lt;P&gt;Year, Month, Weight&lt;/P&gt;
&lt;P&gt;where Year is stored like 2020,2021,2022 and month is stored in numbers like 1,2,3,4.&lt;/P&gt;
&lt;P&gt;I have to pick weight for previous month data.&lt;/P&gt;
&lt;P&gt;So as on today my weight should be picked for 2,2022.&lt;/P&gt;
&lt;P&gt;Please help&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 07:49:19 GMT</pubDate>
    <dc:creator>risabhroy_03</dc:creator>
    <dc:date>2022-03-17T07:49:19Z</dc:date>
    <item>
      <title>Date &amp; Year</title>
      <link>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1906365#M74712</link>
      <description>&lt;P&gt;I have a table that has the following columns&lt;/P&gt;
&lt;P&gt;Year, Month, Weight&lt;/P&gt;
&lt;P&gt;where Year is stored like 2020,2021,2022 and month is stored in numbers like 1,2,3,4.&lt;/P&gt;
&lt;P&gt;I have to pick weight for previous month data.&lt;/P&gt;
&lt;P&gt;So as on today my weight should be picked for 2,2022.&lt;/P&gt;
&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 07:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1906365#M74712</guid>
      <dc:creator>risabhroy_03</dc:creator>
      <dc:date>2022-03-17T07:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Year</title>
      <link>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1907947#M74837</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/144194"&gt;@risabhroy_03&lt;/a&gt;&amp;nbsp;, please check if this works for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Aux:&lt;BR /&gt;Load * INLINE [&lt;BR /&gt;Year, Month, Weight&lt;BR /&gt;2022, 3, 76&lt;BR /&gt;2022, 2, 75&lt;BR /&gt;2022, 1, 74&lt;BR /&gt;2021, 12, 73&lt;BR /&gt;2021, 11, 72&lt;BR /&gt;2021, 10, 71&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;Year, &lt;BR /&gt;Month, &lt;BR /&gt;monthname(makedate(Year, Month)) as MonthYear,&lt;BR /&gt;if(rowno()=1, Weight, previous(Weight)) as PreviousWeight,&lt;BR /&gt;Weight&lt;BR /&gt;Resident Aux&lt;BR /&gt;order by &lt;BR /&gt;Year desc, &lt;BR /&gt;Month desc;&lt;/P&gt;
&lt;P&gt;drop table Aux;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QFabian_1-1647911170444.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/75019i17A0234ED7A6839D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QFabian_1-1647911170444.png" alt="QFabian_1-1647911170444.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 01:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1907947#M74837</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2022-03-22T01:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Year</title>
      <link>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1907989#M74844</link>
      <description>&lt;P&gt;try like below:&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;Load * INLINE [&lt;BR /&gt;Year, Month, Weight&lt;BR /&gt;2022, 3, 40&lt;BR /&gt;2022, 2, 50&lt;BR /&gt;2022, 1, 55&lt;BR /&gt;2021, 12, 60&lt;BR /&gt;2021, 11, 62&lt;BR /&gt;2021, 10, 75&lt;BR /&gt;2020, 8, 50&lt;BR /&gt;2020, 4, 35&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Final:&lt;BR /&gt;Load&lt;BR /&gt;Year,&lt;BR /&gt;Month,&lt;BR /&gt;Weight,&lt;BR /&gt;if(Weight, previous(Weight), null()) as PreviousWeight&lt;BR /&gt;Resident Data&lt;BR /&gt;order by&lt;BR /&gt;Year, Month ,Weight desc;&lt;BR /&gt;drop table Data;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 07:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-amp-Year/m-p/1907989#M74844</guid>
      <dc:creator>Iswarya_</dc:creator>
      <dc:date>2022-03-22T07:11:50Z</dc:date>
    </item>
  </channel>
</rss>

