<?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 GetFieldSelection Previous Year Value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/GetFieldSelection-Previous-Year-Value/m-p/2004327#M83145</link>
    <description>&lt;P&gt;I am using GetFieldselction function and getting the value of Filtered year using below formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;[MonthYear]={"$(=GetFieldSelections(MonthYear))"}&amp;gt;}[Total Income])/1000000&amp;nbsp; --This gives me Filtered year value correctly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, based on filter selction, for example if I choose filter as Oct-22, I would like to get Oct-21 values in other field.&lt;/P&gt;
&lt;P&gt;I tried the below but it doesn't work.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;[MonthYear]={"=$=AddYears(=GetFieldSelections(MonthYear)),-1)"}&amp;gt;}[Total Income ])/1000000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone please tell me how to get previous year value based on filter selection using "GetFieldselction"?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 22:48:40 GMT</pubDate>
    <dc:creator>SindhuraK</dc:creator>
    <dc:date>2022-11-14T22:48:40Z</dc:date>
    <item>
      <title>GetFieldSelection Previous Year Value</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelection-Previous-Year-Value/m-p/2004327#M83145</link>
      <description>&lt;P&gt;I am using GetFieldselction function and getting the value of Filtered year using below formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;[MonthYear]={"$(=GetFieldSelections(MonthYear))"}&amp;gt;}[Total Income])/1000000&amp;nbsp; --This gives me Filtered year value correctly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, based on filter selction, for example if I choose filter as Oct-22, I would like to get Oct-21 values in other field.&lt;/P&gt;
&lt;P&gt;I tried the below but it doesn't work.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;[MonthYear]={"=$=AddYears(=GetFieldSelections(MonthYear)),-1)"}&amp;gt;}[Total Income ])/1000000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone please tell me how to get previous year value based on filter selection using "GetFieldselction"?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 22:48:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelection-Previous-Year-Value/m-p/2004327#M83145</guid>
      <dc:creator>SindhuraK</dc:creator>
      <dc:date>2022-11-14T22:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelection Previous Year Value</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelection-Previous-Year-Value/m-p/2007710#M83380</link>
      <description>&lt;P&gt;Consider adding a serial date field to your master calendar: Autonumber(MonthYear) as _YM_Serial. Make sure your calendar is ascending sorted.&lt;/P&gt;
&lt;P&gt;Then calculate like this:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;_YM_Serial = {$(=Max(_YM_Serial))}&amp;gt;}[Total Income]).&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;_YM_Serial = {"=$(=Max(_YM_Serial)-1)"}&amp;gt;}[Total Income]) for the previous year.&lt;/P&gt;
&lt;P&gt;Selecting okt 2022 will yield that result. Selecting oct 2021 will yield that months result since your calendar would like something like this:&lt;/P&gt;
&lt;P&gt;MonthYear , _YM_Serial&lt;/P&gt;
&lt;P&gt;oct. 2021 , 1&lt;/P&gt;
&lt;P&gt;oct. 2022 , 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 15:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelection-Previous-Year-Value/m-p/2007710#M83380</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2022-11-22T15:22:13Z</dc:date>
    </item>
  </channel>
</rss>

