<?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 Get latest 5 year data only in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-latest-5-year-data-only/m-p/1932563#M206038</link>
    <description>&lt;P&gt;HI All,&lt;/P&gt;
&lt;P&gt;I am using this expression&lt;/P&gt;
&lt;P&gt;=Aggr(if(Rank(Count(reporting_year))&amp;lt;6,reporting_year),reporting_year) this gives me latest 5 year data.&lt;/P&gt;
&lt;P&gt;But as soon as i select reporting year from filter, in bar chart only selected year is coming.&lt;BR /&gt;Is there a way if user select any reporting year from filter , still latest 5 year data should be visible not the select reporting year.&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2022 15:20:06 GMT</pubDate>
    <dc:creator>Qlik1_User1</dc:creator>
    <dc:date>2022-05-18T15:20:06Z</dc:date>
    <item>
      <title>Get latest 5 year data only</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-latest-5-year-data-only/m-p/1932563#M206038</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;
&lt;P&gt;I am using this expression&lt;/P&gt;
&lt;P&gt;=Aggr(if(Rank(Count(reporting_year))&amp;lt;6,reporting_year),reporting_year) this gives me latest 5 year data.&lt;/P&gt;
&lt;P&gt;But as soon as i select reporting year from filter, in bar chart only selected year is coming.&lt;BR /&gt;Is there a way if user select any reporting year from filter , still latest 5 year data should be visible not the select reporting year.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 15:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Get-latest-5-year-data-only/m-p/1932563#M206038</guid>
      <dc:creator>Qlik1_User1</dc:creator>
      <dc:date>2022-05-18T15:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get latest 5 year data only</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Get-latest-5-year-data-only/m-p/1932754#M206052</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Try below, for calculated dimension, but in this case you also need to modiy your measure to ignore selections in field&amp;nbsp;reporting_year&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dimension&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=Aggr(only({1&amp;lt;reporting_year={"&amp;gt;$(=Max(reporting_year)-5)"}&amp;gt;}&amp;nbsp; reporting_year ),reporting_year)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Measure&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;reporting_year= &amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ideally you can restrict your measure instead of the dimension. for example&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dimension =&amp;nbsp;reporting_year&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Measure =&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;reporting_year={"&amp;gt;$(=Max(reporting_year)-5)"} &amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 01:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Get-latest-5-year-data-only/m-p/1932754#M206052</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-05-19T01:57:41Z</dc:date>
    </item>
  </channel>
</rss>

