<?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: last two years in a chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130595#M756535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(GetSelectedCount(Year),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(total&amp;lt;Year,Pto&amp;gt; Val)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Year, Pto,Num)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;}&amp;nbsp; total&amp;lt;Year,Pto&amp;gt; Val) // Count({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;} DISTINCT Num)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Year, Pto,Num))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want to add this as another expression in your existing line chart with already existing two dimensions, this will not really work well, I think. But it should work in a table chart or if you use the expression as part of your line chart expression (for example as denominator to normalize your values per person).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Sep 2018 11:44:49 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2018-09-16T11:44:49Z</dc:date>
    <item>
      <title>last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130592#M756532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!!&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;How can I show in a chart, by default, the last two years? (only in this chart) Year is a dimension and i can select the years in a &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;list box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I appreciate any help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130592#M756532</guid>
      <dc:creator>francis_gr</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130593#M756533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean with 'by default'? Should a selection in Year show the default or the selected years? Or any other condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try maybe an expression in your chart like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(GetSelectedCount(YearField),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Value),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;YearField = {$(=Max(YearField)),$(=Max(YearField)-1)}&amp;gt;} Value)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second Sum() uses Set Analysis to create a specific Year filter for the last two years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2018 18:18:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130593#M756533</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-15T18:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130594#M756534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan!&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Your expression is perfect and solves my question, &lt;SPAN lang="en"&gt;but, abusing a little of your patience, I would need to know &lt;SPAN lang="en"&gt;what would be the expression to show on the same chart, for the selected years , the average of "&lt;STRONG&gt;val&lt;/STRONG&gt;" field por the people with the same "&lt;STRONG&gt;Pto&lt;/STRONG&gt;" field&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, see my attached file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 09:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130594#M756534</guid>
      <dc:creator>francis_gr</dc:creator>
      <dc:date>2018-09-16T09:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130595#M756535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(GetSelectedCount(Year),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg(total&amp;lt;Year,Pto&amp;gt; Val)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Year, Pto,Num)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Avg({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;}&amp;nbsp; total&amp;lt;Year,Pto&amp;gt; Val) // Count({&amp;lt;Year = {$(=Max(Year)),$(=Max(Year)-1)}&amp;gt;} DISTINCT Num)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Year, Pto,Num))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want to add this as another expression in your existing line chart with already existing two dimensions, this will not really work well, I think. But it should work in a table chart or if you use the expression as part of your line chart expression (for example as denominator to normalize your values per person).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 11:44:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130595#M756535</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-16T11:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130596#M756536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Stefan! That’s pretty close.&lt;/P&gt;&lt;P&gt;Just need that for the year(s) selected, if I select a name , line chart shows the selected person and the average val of all persons with the same job (pto field).&lt;/P&gt;&lt;P&gt;If I select a “pto” it must show all persons with the same “pto” and the average “val” for all of them.&lt;/P&gt;&lt;P&gt;Thanks for your suday time.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 18:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/130596#M756536</guid>
      <dc:creator>francis_gr</dc:creator>
      <dc:date>2018-09-16T18:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: last two years in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/1681394#M756537</link>
      <description>&lt;P&gt;I got this to work perfectly except when I need to add a second condition.&amp;nbsp; It shows no data to display.&amp;nbsp; This is what I am trying to use:&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;=&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;If&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;GetSelectedCount&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;Year&lt;/FONT&gt;&lt;FONT size="1"&gt;),&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;Count&lt;/FONT&gt;&lt;FONT size="1"&gt;({&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Cause (MIDAS)]&lt;/FONT&gt;&lt;FONT size="1"&gt; = {'Communication failures'}&amp;gt;}&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[MIDAS Record ID]&lt;/FONT&gt;&lt;FONT size="1"&gt;),&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;Count&lt;/FONT&gt;&lt;FONT size="1"&gt;({&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;Year&lt;/FONT&gt;&lt;FONT size="1"&gt; = {&lt;/FONT&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT size="1" color="#808080"&gt;$(=Max(Year))&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT size="1" color="#808080"&gt;$(=Max(Year)-1)&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;&amp;gt;} {&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Cause (MIDAS)]&lt;/FONT&gt;&lt;FONT size="1"&gt; = {'Communication failures'}&amp;gt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[MIDAS Record ID]&lt;/FONT&gt;&lt;FONT size="1"&gt;&amp;gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Do you know how to fix so I can default to the past two years for only records that have a Cause[MIDAS] that = Communication Failure?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 15:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/last-two-years-in-a-chart/m-p/1681394#M756537</guid>
      <dc:creator>fema3773</dc:creator>
      <dc:date>2020-03-03T15:49:23Z</dc:date>
    </item>
  </channel>
</rss>

