<?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 Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564565#M210710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/23109"&gt;Jagan Mohan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please help on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2014 10:33:57 GMT</pubDate>
    <dc:creator>PradeepReddy</dc:creator>
    <dc:date>2014-03-28T10:33:57Z</dc:date>
    <item>
      <title>Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564558#M210703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I had a simple requirement, but not getting the solution. May be missing something..&lt;SPAN class="emoticon_sad emoticon-inline" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Scenario&lt;/STRONG&gt;:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;There is 3 fields in one table.(Fields: Firm_Name, Time_Period, Hours). I want to calculate the Median of the Hours and correponding Firm_Name.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dimension : Time_Period&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expressions: Median, Firm_Name( corresponding to the Median value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Functionality&lt;/STRONG&gt;:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If the count is Odd number then there is no issue.--- Median(Hours)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If the count is Even then, the median value doesn't match to any existing Hours value. So I am not able to display the Firm_Name. So I want to&amp;nbsp; dispaly the middle 2 values and its correposnding Firm_Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Ex&lt;/STRONG&gt;: 6,9,2,5,10,7 (After sorting... 2,5,6,7,9,10)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here I want to display the values 6 &amp;amp; 7 and its coresponding Firm_Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 17:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564558#M210703</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-26T17:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564559#M210704</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;/P&gt;&lt;P&gt;I think Firm_Name should be a dimension? Or do I get something wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 17:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564559#M210704</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-26T17:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564560#M210705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Dimension is Time_Period.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 17:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564560#M210705</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-26T17:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564561#M210706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you upload sample data and the expected result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 18:00:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564561#M210706</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-26T18:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564562#M210707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the &lt;STRONG&gt;sample data&lt;/STRONG&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="208"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="79"&gt;Firm_Name&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="43"&gt;Hours&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="86"&gt;Time_Period&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm1&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm2&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm4&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;14&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm9&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm10&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm11&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm15&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;78&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm12&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;87&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm18&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm19&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;70&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm22&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;55&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Firm23&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;76&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Period3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expected &lt;STRONG&gt;output&lt;/STRONG&gt; would be like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="215"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" width="86"&gt;Time_Period&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="54"&gt;Median&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="75"&gt;Firm Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;Period1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Firm1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="40" style="border-top: none;"&gt;Period2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;" width="54"&gt;65&lt;BR /&gt;78&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;" width="75"&gt;Firm10&lt;BR /&gt; Firm15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;Period3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;70&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Firm19&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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: 12px;"&gt;I am getting the result, If the count is Odd number. (using Median(), FieldIndex(), FieldValue()..)&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: 12px;"&gt;But not getting for the Even count....&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&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: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 18:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564562#M210707</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-26T18:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564563#M210708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find attached solution. But the Median of Period2 = 55, so no match with a Firm!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 19:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564563#M210708</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-26T19:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564564#M210709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ralf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your quick support....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes you are right... that is the tricky one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Count(Hours) is odd , then it is straight forward.. no issue in this case...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (in this case Median of Period2 should exists exists in the list of hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Count(Hours) is even, then we need to display the&amp;nbsp; Firm_Name of middle 2 values... as shown above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (in this case Median of Period2 may or may not exists in the list of hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pradeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 03:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564564#M210709</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-27T03:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564565#M210710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/23109"&gt;Jagan Mohan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please help on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 10:33:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564565#M210710</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-28T10:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564566#M210711</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;/P&gt;&lt;P&gt;this is what I have so far. But it's not working for the upper middle (Period2=65). I think this is a set analysis isssue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 14:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564566#M210711</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-03-28T14:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Median Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564567#M210712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If we can achieve this&amp;nbsp; using set analysis, can you please assist me how to achieve this..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2014 17:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-Calculation/m-p/564567#M210712</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-03-29T17:31:19Z</dc:date>
    </item>
  </channel>
</rss>

