<?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 with previous months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-with-previous-months/m-p/697342#M474251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to insert a set analysis showing last 3 months, but i use aggr function in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look:&lt;/P&gt;&lt;P&gt;=Count(&lt;/P&gt;&lt;P&gt;DISTINCT Aggr(if(((Sum(QtdeOcorFSP) + Sum(QtdeOcorOESP)) = 0),nCdDistribuidor_RabRoteiro),nCdDistribuidor_RabRoteiro, MesAno_RABRoteiro))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what i want is :&lt;/P&gt;&lt;P&gt;if the sum of QtdeOcorFSP and QtdeOcorOESP is 0, then, i count nCdDistribuidor_RabRoteiro, using aggr MesAno_RABRoteiro and nCdDistribuidor_RabRoteiro as Dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've inserted set analysis before "distinct", but if i select the month, dont bring me last 3 months, because i'm grouping by my dimension MesAno_RABRoteiro .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to see this with last 3 months of maxDate. If i select september, it will show jul, ago and sep. If select ago, show ago, jul, and jun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a pivot table with MesAno_RABRoteiro and affiliate as dimension. Have just 1 expression, which i've explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2014 17:03:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-25T17:03:37Z</dc:date>
    <item>
      <title>Aggr with previous months</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-with-previous-months/m-p/697342#M474251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to insert a set analysis showing last 3 months, but i use aggr function in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look:&lt;/P&gt;&lt;P&gt;=Count(&lt;/P&gt;&lt;P&gt;DISTINCT Aggr(if(((Sum(QtdeOcorFSP) + Sum(QtdeOcorOESP)) = 0),nCdDistribuidor_RabRoteiro),nCdDistribuidor_RabRoteiro, MesAno_RABRoteiro))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what i want is :&lt;/P&gt;&lt;P&gt;if the sum of QtdeOcorFSP and QtdeOcorOESP is 0, then, i count nCdDistribuidor_RabRoteiro, using aggr MesAno_RABRoteiro and nCdDistribuidor_RabRoteiro as Dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've inserted set analysis before "distinct", but if i select the month, dont bring me last 3 months, because i'm grouping by my dimension MesAno_RABRoteiro .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to see this with last 3 months of maxDate. If i select september, it will show jul, ago and sep. If select ago, show ago, jul, and jun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a pivot table with MesAno_RABRoteiro and affiliate as dimension. Have just 1 expression, which i've explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 17:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-with-previous-months/m-p/697342#M474251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-25T17:03:37Z</dc:date>
    </item>
  </channel>
</rss>

