<?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: Complicate avarage for not Similar number of steps in different entities. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308569#M407049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need to add BakashaID as a Aggr() function dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Subject={1}, Gk_IdShlav = {"=Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code) = 4 or Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code)&amp;gt; Shalav_Sug_Shalav_code"}&amp;gt;}&amp;nbsp; Aggr (Avg (Interval(to_date - from_date, 'd')/30), Shalav_Sug_Shalav_code, &lt;SPAN style="color: #ff0000;"&gt;BakashaID&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 May 2017 11:46:18 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-05-22T11:46:18Z</dc:date>
    <item>
      <title>Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308567#M407047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi to all&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;i have an entity called "BakashaID" in it there can be only 4 steps (step 4 is final with no duration) called "Shalav_Sug_Shalav_code" ( uniq key step in entity called "Gk_IdShlav" ) and the dates for each step.&amp;nbsp;&amp;nbsp; i need to calc the avg of months for each step , i have an expression that does that :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum( {&amp;lt;Subject={1},Gk_IdShlav = {"=Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code) = 4 or&amp;nbsp; &lt;/STRONG&gt;&lt;STRONG&gt; Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code) &amp;gt; Shalav_Sug_Shalav_code"}&amp;gt;}&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggr (&amp;nbsp;&amp;nbsp; avg&amp;nbsp; (&amp;nbsp;&amp;nbsp; Interval(&amp;nbsp; to_date - from_date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'d') / 30&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp; Shalav_Sug_Shalav_code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;its work fine when all &lt;SPAN style="font-size: 13.3333px;"&gt;entities have the same number of steps :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="good avg.PNG" class="jive-image image-1" height="296" src="/legacyfs/online/164202_good avg.PNG" style="height: 296px; width: 455.521px;" width="455" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But &lt;SPAN style="font-size: 13.3333px;"&gt;when not all &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;entities have the same number of steps its not working good :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="bad avg.PNG" class="jive-image image-2" height="305" src="/legacyfs/online/164207_bad avg.PNG" style="height: 305px; width: 446.247px;" width="446" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody make it OK ?&amp;nbsp;&amp;nbsp; thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 06:46:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308567#M407047</guid>
      <dc:creator>yanivvl0</dc:creator>
      <dc:date>2017-05-22T06:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308568#M407048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Instead of using such a big calculated expression, i would suggest you can try the below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a field to calculate the difference of month between from_date and To_Date in the script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eg: (To_date-From_date)/30 As MonthDiff&lt;/P&gt;&lt;P&gt;2. Create a bar chart with "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Shalav_Sug_Shalav_code" (dimension) and a expression - Round(Avg(MonthDiff))&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;&lt;BR /&gt;&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;This will work either you have all entites or less entities.&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;&lt;BR /&gt;&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;Attached is the sample app with working chart. Hope it helps&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 11:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308568#M407048</guid>
      <dc:creator>malini_qlikview</dc:creator>
      <dc:date>2017-05-22T11:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308569#M407049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need to add BakashaID as a Aggr() function dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;Subject={1}, Gk_IdShlav = {"=Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code) = 4 or Aggr(Max(TOTAL &amp;lt;BakashaID&amp;gt; Shalav_Sug_Shalav_code), BakashaID, Shalav_Sug_Shalav_code)&amp;gt; Shalav_Sug_Shalav_code"}&amp;gt;}&amp;nbsp; Aggr (Avg (Interval(to_date - from_date, 'd')/30), Shalav_Sug_Shalav_code, &lt;SPAN style="color: #ff0000;"&gt;BakashaID&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 11:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308569#M407049</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-22T11:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308570#M407050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sunny , i tried but something goes wrong , &lt;/P&gt;&lt;P&gt;for step 1 it calculate the sum of all months , for step 2 the value is too low , and step 3 is missing...&lt;/P&gt;&lt;P&gt;i attached data so any one can check it out - Thanks .&lt;/P&gt;&lt;P&gt;&lt;IMG alt="bad avg_2.PNG" class="jive-image image-1" height="294" src="/legacyfs/online/164344_bad avg_2.PNG" style="height: 294px; width: 441px;" width="441" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 06:02:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308570#M407050</guid>
      <dc:creator>yanivvl0</dc:creator>
      <dc:date>2017-05-23T06:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308571#M407051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Malini , great idea , &lt;/P&gt;&lt;P&gt;it make the sum OK , i tried to calc the avg , but there is an error , only step 3 is good because it single ,&lt;/P&gt;&lt;P&gt;step 1 need to be something like 9.8 ~&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="bad avg_3.PNG" class="jive-image image-1" height="316" src="/legacyfs/online/164360_bad avg_3.PNG" style="height: 315.856px; width: 336px;" width="336" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 06:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308571#M407051</guid>
      <dc:creator>yanivvl0</dc:creator>
      <dc:date>2017-05-23T06:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Complicate avarage for not Similar number of steps in different entities.</title>
      <link>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308572#M407052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Malini - sorry&amp;nbsp; - its simple and amazing solutuin , THANKS !!!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 07:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicate-avarage-for-not-Similar-number-of-steps-in-different/m-p/1308572#M407052</guid>
      <dc:creator>yanivvl0</dc:creator>
      <dc:date>2017-05-23T07:43:22Z</dc:date>
    </item>
  </channel>
</rss>

