<?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 Set analysis - Calculating using a expression on the same pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531707#M438782</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a pivot table with a expression that uses a variable (__PeriodoATCBaja) for calculating a sum:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Sum ({$&amp;lt;[PeriodoHasta]={$(__PeriodoATCBaja)}&amp;gt;} [AtCompletion_Baja])&lt;/P&gt;&lt;P&gt;But instead of using this variable (which has a single value for all the pivot table) i want to calculate the sum based in the next expression which i have already added in&amp;nbsp; the pivot table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = aggr(MAX({&amp;lt; [AtCompletion_Baja] = {'&amp;gt;0'} &amp;gt;} [PeriodoMovto]), [Oferta])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (This expreson label is FechaBajaOfer]&lt;/P&gt;&lt;P&gt;The purpose is to make the sum for each row according to the expression value in FechaBajaOfer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try the expression below but it always returns 0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;[PeriodoHasta]=FechaBajaOfer&amp;gt;}[AtCompletion_Baja])&lt;/P&gt;&lt;P&gt;If I use the variable for the expresion the result is:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 499px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3972i9EA45BCDE2ACA1E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 501px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3973iD8A2D3979C91AAF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 16:42:44 GMT</pubDate>
    <dc:creator>AitorK</dc:creator>
    <dc:date>2019-01-17T16:42:44Z</dc:date>
    <item>
      <title>Set analysis - Calculating using a expression on the same pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531707#M438782</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a pivot table with a expression that uses a variable (__PeriodoATCBaja) for calculating a sum:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Sum ({$&amp;lt;[PeriodoHasta]={$(__PeriodoATCBaja)}&amp;gt;} [AtCompletion_Baja])&lt;/P&gt;&lt;P&gt;But instead of using this variable (which has a single value for all the pivot table) i want to calculate the sum based in the next expression which i have already added in&amp;nbsp; the pivot table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = aggr(MAX({&amp;lt; [AtCompletion_Baja] = {'&amp;gt;0'} &amp;gt;} [PeriodoMovto]), [Oferta])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (This expreson label is FechaBajaOfer]&lt;/P&gt;&lt;P&gt;The purpose is to make the sum for each row according to the expression value in FechaBajaOfer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try the expression below but it always returns 0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum({$&amp;lt;[PeriodoHasta]=FechaBajaOfer&amp;gt;}[AtCompletion_Baja])&lt;/P&gt;&lt;P&gt;If I use the variable for the expresion the result is:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 499px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3972i9EA45BCDE2ACA1E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 501px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3973iD8A2D3979C91AAF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 16:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531707#M438782</guid>
      <dc:creator>AitorK</dc:creator>
      <dc:date>2019-01-17T16:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Calculating using a expression on the same pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531713#M438784</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;PRE&gt;Sum(Aggr(&lt;BR /&gt;If([PeriodoHasta] = Max(TOTAL &amp;lt;Oferta&amp;gt; {&amp;lt;[AtCompletion_Baja] = {'&amp;gt;0'}&amp;gt;} [PeriodoMovto]), [AtCompletion_Baja])&lt;BR /&gt;, [Oferta], [PeriodoHasta]))&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 16:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531713#M438784</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-17T16:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Calculating using a expression on the same pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531932#M438809</link>
      <description>&lt;P&gt;Thanks for your reply, but it is returning 0 value.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 07:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1531932#M438809</guid>
      <dc:creator>AitorK</dc:creator>
      <dc:date>2019-01-18T07:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Calculating using a expression on the same pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1532075#M438823</link>
      <description>Would you be able to share a sample to show the issue?</description>
      <pubDate>Fri, 18 Jan 2019 12:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Calculating-using-a-expression-on-the-same-pivot/m-p/1532075#M438823</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-18T12:24:47Z</dc:date>
    </item>
  </channel>
</rss>

