<?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 Aggr in set expression using Year and Prior Year not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084506#M361136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Pivot table that displays the value (quantity * cost)&amp;nbsp; of inventory based on grades 1-5.&amp;nbsp; I would like to compare two years.&amp;nbsp; I have the following in two different expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(aggr(sum({$&amp;lt; Year={$(=Only(Year))}&amp;gt;}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))&amp;nbsp;&amp;nbsp; this works&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(aggr(sum({$&amp;lt; Year={$(=Only(Year)-1)}&amp;gt;}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))&amp;nbsp;&amp;nbsp; this shows all 0s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first expression returns data for the year in the selection.&amp;nbsp; The second expression returns 0 for each grade.&lt;/P&gt;&lt;P&gt;What is the proper syntax to return values for year -1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2016 19:58:58 GMT</pubDate>
    <dc:creator>nancymarmat</dc:creator>
    <dc:date>2016-05-05T19:58:58Z</dc:date>
    <item>
      <title>Aggr in set expression using Year and Prior Year not working</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084506#M361136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Pivot table that displays the value (quantity * cost)&amp;nbsp; of inventory based on grades 1-5.&amp;nbsp; I would like to compare two years.&amp;nbsp; I have the following in two different expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(aggr(sum({$&amp;lt; Year={$(=Only(Year))}&amp;gt;}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))&amp;nbsp;&amp;nbsp; this works&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(aggr(sum({$&amp;lt; Year={$(=Only(Year)-1)}&amp;gt;}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))&amp;nbsp;&amp;nbsp; this shows all 0s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first expression returns data for the year in the selection.&amp;nbsp; The second expression returns 0 for each grade.&lt;/P&gt;&lt;P&gt;What is the proper syntax to return values for year -1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 19:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084506#M361136</guid>
      <dc:creator>nancymarmat</dc:creator>
      <dc:date>2016-05-05T19:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in set expression using Year and Prior Year not working</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084507#M361137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;{$&amp;lt; Year={$(=Only(Year)-1)}&amp;gt;}&lt;/SPAN&gt;A&lt;/SPAN&gt;ggr(Sum({$&amp;lt; Year={$(=Only(Year)-1)}&amp;gt;}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 20:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084507#M361137</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-05T20:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr in set expression using Year and Prior Year not working</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084508#M361138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect!&amp;nbsp; It works!&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 20:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-in-set-expression-using-Year-and-Prior-Year-not-working/m-p/1084508#M361138</guid>
      <dc:creator>nancymarmat</dc:creator>
      <dc:date>2016-05-05T20:13:08Z</dc:date>
    </item>
  </channel>
</rss>

