<?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 in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139044#M887800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD AgentName, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HT, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRF_START_TS, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VIP_Bucket&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;C&gt;&lt;/C&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is [Sheet1$]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff6600;"&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;LOAD VIP_Bucket,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; Median(Sum_HT) as Median&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;Group By VIP_Bucket;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;LOAD VIP_Bucket,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; IRF_START_TS,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; Sum(HT) as Sum_HT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;Resident [Sheet1$]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff6600;"&gt;Group By VIP_Bucket, IRF_START_TS;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2016 14:11:49 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-09-14T14:11:49Z</dc:date>
    <item>
      <title>Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139037#M887793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to calculate @Median in the script. &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I used the following expression in a chart:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Median(TOTAL &amp;lt;LVQ&amp;gt; aggr( sum(HT),IRF_START_TS))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IRF_START_TS = Calls &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LVQ= Clasification&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;HT=Time&amp;nbsp; in Sec&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;but i need the median for each LVQ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Do you have any idea?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139037#M887793</guid>
      <dc:creator>male_carrasco</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139038#M887794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to provide some sample data with what you are expecting to see as output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2016 18:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139038#M887794</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-03T18:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139039#M887795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Sorry for the delay.&lt;/P&gt;&lt;P&gt;Please find attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 21:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139039#M887795</guid>
      <dc:creator>male_carrasco</dc:creator>
      <dc:date>2016-09-13T21:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139040#M887796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the expected output that you are looking to see from the sample provided?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 02:15:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139040#M887796</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-14T02:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139041#M887797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny!&lt;BR /&gt;I need calculate the Median in the script, because the agent could be in different buckets.&lt;/P&gt;&lt;P&gt;The median for Bucket 1 is 672, &lt;SPAN style="font-size: 10pt;"&gt;for Bucket 2 is 233, but if I select agent 1174 the calculate of median change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to know if the agent is close the median or not by bucket... It is the reason why I need the calculation the median in the script...&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 13:02:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139041#M887797</guid>
      <dc:creator>male_carrasco</dc:creator>
      <dc:date>2016-09-14T13:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139042#M887798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I can give you a script based solution, but in the mean time here is a front end based solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Median({1}TOTAL &amp;lt;VIP_Bucket&amp;gt; Aggr(Sum({1}HT), IRF_START_TS)) * Avg(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137419_Capture.PNG" style="height: auto;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any selection made in your application won't impact or change your median number. This is done because of the use of 1 which tells the expression not to change based on any selection made&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Median(&lt;SPAN style="color: #ff0000;"&gt;{1}&lt;/SPAN&gt;TOTAL &amp;lt;VIP_Bucket&amp;gt; Aggr(Sum(&lt;SPAN style="color: #ff0000;"&gt;{1}&lt;/SPAN&gt;HT), IRF_START_TS)) * Avg(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, I will post a script based solution as well &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 13:25:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139042#M887798</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-14T13:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139043#M887799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks is a possible solution but i have some variables that i did not include in the example, i will waiting the post!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 13:36:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139043#M887799</guid>
      <dc:creator>male_carrasco</dc:creator>
      <dc:date>2016-09-14T13:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139044#M887800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD AgentName, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HT, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRF_START_TS, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VIP_Bucket&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;C&gt;&lt;/C&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(biff, embedded labels, table is [Sheet1$]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff6600;"&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;LOAD VIP_Bucket,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; Median(Sum_HT) as Median&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;Group By VIP_Bucket;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;LOAD VIP_Bucket,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; IRF_START_TS,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&amp;nbsp; Sum(HT) as Sum_HT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;Resident [Sheet1$]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff6600;"&gt;Group By VIP_Bucket, IRF_START_TS;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 14:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139044#M887800</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-14T14:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Median in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139045#M887801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 14:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Median-in-the-script/m-p/1139045#M887801</guid>
      <dc:creator>male_carrasco</dc:creator>
      <dc:date>2016-09-14T14:22:08Z</dc:date>
    </item>
  </channel>
</rss>

