<?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: median pivot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181511#M382849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this and see if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Median(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;TOTAL &amp;lt;Year&amp;gt;&lt;/SPAN&gt; Aggr(Sum(sales) - Above(Sum(sales), [Carrier Name], Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 15:40:04 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-09-13T15:40:04Z</dc:date>
    <item>
      <title>median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181507#M382845</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 would like to calculate the median value of the field "fatturato" (the expression in the pivot).&lt;/P&gt;&lt;P&gt;The pivot table has "carrier name" and "year" as dimensions like in the picture below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cattura.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137149_Cattura.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I tried using the expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;median(aggr(sum(sales),[Carrier Name]))&lt;/SPAN&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;or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;median(aggr(sum(sales),[Carrier Name], Year))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;median(aggr(sum(sales),Year))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&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;but it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me please? &lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 16:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181507#M382845</guid>
      <dc:creator />
      <dc:date>2016-09-12T16:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181508#M382846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be 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;Median(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; Aggr(Sum(sales), [Carrier Name], Year))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Median(&lt;SPAN style="color: #ff0000;"&gt;TOTAL &amp;lt;Year&amp;gt;&lt;/SPAN&gt; Aggr(Sum(sales), [Carrier Name], Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Median(&lt;SPAN style="color: #ff0000;"&gt;TOTAL &amp;lt;[Carrier Name]&amp;gt;&lt;/SPAN&gt; Aggr(Sum(sales), [Carrier Name], Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 16:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181508#M382846</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-12T16:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181509#M382847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;The second expression does what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 08:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181509#M382847</guid>
      <dc:creator />
      <dc:date>2016-09-13T08:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181510#M382848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression works with the sales but I have to use it also with another value calculated with the before() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(sales)- before(sum(sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gives me the difference between the sales of one year and the sales of the year before.&lt;/P&gt;&lt;P&gt;when I try to calculate the median value of that doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what is the problem? (I think it's beacause the before() function uses the columns to do the calculation).&lt;/P&gt;&lt;P&gt;Or there is anathor way to calculate the difference between years?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 09:15:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181510#M382848</guid>
      <dc:creator />
      <dc:date>2016-09-13T09:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181511#M382849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this and see if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Median(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;TOTAL &amp;lt;Year&amp;gt;&lt;/SPAN&gt; Aggr(Sum(sales) - Above(Sum(sales), [Carrier Name], Year))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181511#M382849</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-13T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181512#M382850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181512#M382850</guid>
      <dc:creator />
      <dc:date>2016-09-13T15:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: median pivot</title>
      <link>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181513#M382851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've checked the data again and i noticed that some rows aren't calculated.&lt;/P&gt;&lt;P&gt;I've put the expression with the "above" function - aggr(sum(Sales)-above(sum(Sales)),[Carrier Name],Year) - in comparison to the expression with the "before" function - (sum(Sales)- before(sum(Sales)) -.&lt;/P&gt;&lt;P&gt;So the median value is also wrong.&lt;/P&gt;&lt;P&gt;In the picture below you can see some examples:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cattura.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139299_Cattura.PNG" style="height: 266px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Do you know what is the problem?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 14:11:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/median-pivot/m-p/1181513#M382851</guid>
      <dc:creator />
      <dc:date>2016-09-30T14:11:57Z</dc:date>
    </item>
  </channel>
</rss>

