<?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: Calculating % in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597228#M444017</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While I am sure it is genius, that is a horrible expression &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;My immediate thought is you should do something in the script to allow you to simplify the formula to make it easier to calculate/follow.&lt;/P&gt;&lt;P&gt;However you may get away with just wrapping another aggr around it, so &lt;EM&gt;possibly&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;sum(if(AGGR(YOURFORMULA,DIMENSIONS)&amp;gt;4,1,0))/count(Employee)&lt;/P&gt;&lt;P&gt;But not exactly sure where the AGGR would need to sit &amp;amp; not sure I have anything that complex to hand to try to compare with. I would imagine the dimensions you would aggregate over are&amp;nbsp;AgentEnterprise_Desc,Agent_Team similar to the existing AGGR you have.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2019 13:00:43 GMT</pubDate>
    <dc:creator>chrismarlow</dc:creator>
    <dc:date>2019-06-28T13:00:43Z</dc:date>
    <item>
      <title>Calculating %</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1596281#M443937</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a calculated field called [Score out of 6] to identify the score of employees.Now i want to calculate Total %ge by team that met a score of 4 or more. &lt;EM&gt;Example: team 1 has 10 employees in Week 10 of 2019. Of these 10 employees, 4 received a score of 4 or higher. The calculated metric for team 1 should be 40%.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Any help is highly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Joshua.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 15:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating/m-p/1596281#M443937</guid>
      <dc:creator>ajsjoshua</dc:creator>
      <dc:date>2019-06-26T15:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating %</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1596424#M443963</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Depending on how your data model works it might just be this;&lt;/P&gt;&lt;P&gt;sum(if([Score out of 6]&amp;gt;4,1,0))/count(Employee)&lt;/P&gt;&lt;P&gt;(Assuming you have a field Employee that you can count to give # employees by team…)&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 17:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating/m-p/1596424#M443963</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-06-26T17:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating %</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597200#M444014</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Thanks for your reply. I tried it but its not working.The calculated expression&amp;nbsp;&lt;SPAN&gt;[Score out of 6] is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=if(Num(sum({&amp;lt;reasoncode={5}&amp;gt;}EventDuration)/Sum(EventDuration),'###%')&amp;lt;=(Num(Median ( aggr(((sum({&amp;lt;reasoncode={5}&amp;gt;}EventDuration)/Sum(EventDuration))),AgentEnterprise_Desc,Agent_Team)),'##.##%')),1,0)&lt;BR /&gt;+&lt;BR /&gt;if(Num((sum({&amp;lt;eventtype={'3'}&amp;gt;}EventDuration)+sum({&amp;lt;eventtype={'5'}&amp;gt;}EventDuration) )/ (Sum(EventDuration)),'##.##%')&amp;gt;='68.0%',1,0)&lt;BR /&gt;+&lt;BR /&gt;If((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60)&amp;lt;=&lt;BR /&gt;((Median ( aggr((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60),AgentEnterprise_Desc,Agent_Team))-&lt;BR /&gt;Stdev ( aggr((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60),AgentEnterprise_Desc,Agent_Team)))&lt;BR /&gt;)&lt;BR /&gt;or&lt;BR /&gt;((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60)&amp;gt;(Median ( aggr((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60),AgentEnterprise_Desc,Agent_Team))-&lt;BR /&gt;Stdev ( aggr((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60),AgentEnterprise_Desc,Agent_Team)))&lt;BR /&gt;and (((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime) + sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60)&amp;lt;= (Median ( aggr((((sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}worktime)&lt;BR /&gt;+&lt;BR /&gt;sum({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}holdtime))/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'))/60),AgentEnterprise_Desc,Agent_Team))))&lt;BR /&gt;,1,0)&lt;BR /&gt;+&lt;BR /&gt;If(((($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle))/60)&amp;lt;=(Median ( aggr(($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle)/60),AgentEnterprise_Desc,Agent_Team))-&lt;BR /&gt;Stdev ( aggr(($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle)/60),AgentEnterprise_Desc,Agent_Team))))&lt;BR /&gt;or&lt;BR /&gt;((($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle))/60)&amp;gt;&lt;BR /&gt;(Median ( aggr(($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle)/60),AgentEnterprise_Desc,Agent_Team))-&lt;BR /&gt;Stdev ( aggr(($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle)/60),AgentEnterprise_Desc,Agent_Team)))&lt;BR /&gt;and (($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle))/60)&amp;lt;=&lt;BR /&gt;(Median ( aggr(($(vACD_CSQ_Ag_HoldTime)/$(vACD_CSQ_Ag_CallsHandle)/60),AgentEnterprise_Desc,Agent_Team))))&lt;BR /&gt;,1,0)&lt;BR /&gt;+&lt;BR /&gt;if(num(num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"},holdtime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0')/num(count({&amp;lt;targettype={0},disposition={2},talktime={"&amp;gt;0"}&amp;gt;}talktime),'#,##0'),'##.##%')&amp;lt;='30.0%',1,0)&lt;BR /&gt;+&lt;BR /&gt;if(avg(Agent_Total_Login_Time_LoginID)&amp;gt;=6 and (Num(((sum({&amp;lt;reasoncode={21,2,1}&amp;gt;}EventDuration)/count(DISTINCT LocalDate))/60), '##.##'))&amp;lt;=62,1,&lt;BR /&gt;if(avg(Agent_Total_Login_Time_LoginID)&amp;gt;4.5 and avg(Agent_Total_Login_Time_LoginID)&amp;lt;6 and (Num(((sum({&amp;lt;reasoncode={21,2,1}&amp;gt;}EventDuration)/count(DISTINCT LocalDate))/60), '##.##'))&amp;lt;=22,1,&lt;BR /&gt;if(avg(Agent_Total_Login_Time_LoginID)&amp;lt;=4.5 and (Num(((sum({&amp;lt;reasoncode={21,2,1}&amp;gt;}EventDuration)/count(DISTINCT LocalDate))/60), '##.##'))&amp;lt;=11,1,0)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Joshua.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 12:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597200#M444014</guid>
      <dc:creator>ajsjoshua</dc:creator>
      <dc:date>2019-06-28T12:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating %</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597212#M444015</link>
      <description>&lt;P&gt;Hi Chris ,&lt;/P&gt;&lt;P&gt;Tried using the variable instead of expression but its not working&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum(if($(vScore)&amp;gt;4,1,0))/count(Employee)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 12:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597212#M444015</guid>
      <dc:creator>ajsjoshua</dc:creator>
      <dc:date>2019-06-28T12:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating %</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597228#M444017</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While I am sure it is genius, that is a horrible expression &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;My immediate thought is you should do something in the script to allow you to simplify the formula to make it easier to calculate/follow.&lt;/P&gt;&lt;P&gt;However you may get away with just wrapping another aggr around it, so &lt;EM&gt;possibly&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;sum(if(AGGR(YOURFORMULA,DIMENSIONS)&amp;gt;4,1,0))/count(Employee)&lt;/P&gt;&lt;P&gt;But not exactly sure where the AGGR would need to sit &amp;amp; not sure I have anything that complex to hand to try to compare with. I would imagine the dimensions you would aggregate over are&amp;nbsp;AgentEnterprise_Desc,Agent_Team similar to the existing AGGR you have.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2019 13:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating/m-p/1597228#M444017</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-06-28T13:00:43Z</dc:date>
    </item>
  </channel>
</rss>

