<?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: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721869#M724724</link>
    <description>&lt;P&gt;can you share the file or the new sample&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2020 18:47:57 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-06-24T18:47:57Z</dc:date>
    <item>
      <title>HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1707912#M724717</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;Please help me to write down an expression to calculate trimmean over the attached set of data.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1707912#M724717</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721798#M724718</link>
      <description>&lt;P&gt;Dear Members&lt;/P&gt;&lt;P&gt;Please help me on this&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 15:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721798#M724718</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-24T15:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721827#M724719</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/15833"&gt;@nevilledhamsiri&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I left the code long enough to understand the logic :&lt;/P&gt;&lt;P&gt;Script :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data0:
LOAD 
	 DATE, 
     [CLAIM PAID]
    
FROM
[.\TRIMMEAN(1).xlsx]
(ooxml, embedded labels, table is Sheet1);

Data:
noconcatenate
LOAD rowno() as IDtmp,
	 DATE, 
     [CLAIM PAID]
    
resident Data0 order by [CLAIM PAID];
drop table Data0;

let percent=0.1;

Tmp1:

load count([CLAIM PAID]) as CountClaim resident Data;

let vcount=peek('CountClaim',0,'tmp');

drop table Tmp1;

let k=floor($(vcount)*($(percent))/2);

Tmp2:
load min(IDtmp) as minIDtmp, max(IDtmp) as maxIDtmp resident Data;


let Idmin=peek('minIDtmp',0,'Tmp2')+$(k);
let Idmax=peek('maxIDtmp',0,'Tmp2')-$(k);

drop table Tmp2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36195iD48A45093BB91D67/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Formula of Trimean &lt;STRONG&gt;&lt;EM&gt;=avg({&amp;lt;IDtmp={"&amp;gt;=$(Idmin) &amp;lt;=$(Idmax)"}&amp;gt;} [CLAIM PAID])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attached qvw file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 16:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721827#M724719</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-24T16:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721863#M724720</link>
      <description>&lt;P&gt;Dear Taoufiq,&lt;/P&gt;&lt;P&gt;Tanks a lot for your reply. When I add one more dimension which is Branch, what changes to be made for the mean calculation. Please see the working attached. The numbering wont come separately for two branches &amp;amp; the mean calculated is also different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please send me the revised script for this. Sorry for the troubles made,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neville&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 18:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721863#M724720</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-24T18:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721865#M724722</link>
      <description />
      <pubDate>Wed, 24 Jun 2020 18:44:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721865#M724722</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-24T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721869#M724724</link>
      <description>&lt;P&gt;can you share the file or the new sample&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 18:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721869#M724724</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-24T18:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721870#M724726</link>
      <description />
      <pubDate>Wed, 24 Jun 2020 18:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721870#M724726</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-24T18:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721875#M724727</link>
      <description>&lt;P&gt;If I understood correctly you want a Trimean by branch ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 19:05:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721875#M724727</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-24T19:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721877#M724728</link>
      <description>&lt;P&gt;Yes Dear, that is what I need.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 19:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1721877#M724728</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-24T19:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722072#M724729</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/15833"&gt;@nevilledhamsiri&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the new version of Script :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;let percent=0.2;


File:
LOAD DATE, 
     BRANCH,
     [CLAIM PAID]
FROM
.\tream_mean.xlsx
(ooxml, embedded labels, table is Sheet1) where len(DATE)&amp;gt;0;

Tmp:
load distinct BRANCH as Br resident File;


let NumRows=NoOfRows('Tmp');

FOR i=0 to $(NumRows)-1

  LET vBRANCH=Peek('Br',$(i),'Tmp');
  
	Data:
	noconcatenate
	LOAD rowno() as IDtmp,
		 DATE as D, 
		 BRANCH as B,
	     [CLAIM PAID] as C
	    
	resident File where Match(BRANCH,'$(vBRANCH)')&amp;gt;0 order by [CLAIM PAID];
		
	Tmp1:
	
	load count(C) as CountClaim resident Data;
	
	let vcount=peek('CountClaim',0,'Tmp1');
	
	drop table Tmp1;
	
	let k=floor($(vcount)*($(percent))/2);
	
	Tmp2:
	load min(IDtmp) as minIDtmp, max(IDtmp) as maxIDtmp resident Data;
	
	
	let Idmin=peek('minIDtmp',0,'Tmp2')+$(k);
	let Idmax=peek('maxIDtmp',0,'Tmp2')-$(k);
	
	output:
	load '$(vBRANCH)' as BRANCH,Avg(C) as TreamBranch resident Data where IDtmp&amp;gt;='$(Idmin)' and IDtmp&amp;lt;='$(Idmax)';
		
	drop table Tmp2;
	drop table Data;
		  
NEXT;


drop table Tmp;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 424px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36239iC6E82E4C647EAFF8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attached Qvw file&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722072#M724729</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-25T09:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722266#M724730</link>
      <description>&lt;P&gt;Dear Taoufiq, Thanks for your reply. I find it some what difficult to understand the way the script is written to go for the out come. But I will take my own time &amp;amp; try to learn from it more. For the moment my issue was resolved. Thank you again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neville.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 16:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722266#M724730</guid>
      <dc:creator>nevilledhamsiri</dc:creator>
      <dc:date>2020-06-25T16:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO CALCULATE TRIMMEAN IN QLIK VIEW</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722289#M724731</link>
      <description>&lt;P&gt;Neville, Awesome! take your time and contact me if you have any questions.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 16:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-CALCULATE-TRIMMEAN-IN-QLIK-VIEW/m-p/1722289#M724731</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-25T16:53:20Z</dc:date>
    </item>
  </channel>
</rss>

