<?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 Calculation of Range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612738#M685362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&amp;nbsp; &lt;/P&gt;&lt;P&gt; I am given a task to calculate the frequency of calls across a territory. If the rep called a physician regarding the sale of the product 5 times, then frequency is 5 and HCP count is 1....I generated frequencies from 1 to 124 in my pivot table using a calculated dimension which is working fine. But my concern is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My manager wants frequencies till 19 in order from 1..2..3..4...5..6.....19... &lt;/P&gt;&lt;P&gt;And from the frequency 21-124 as 20+.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be grateful if someone helps me with this.....Eager for the reply....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 19:22:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-05T19:22:55Z</dc:date>
    <item>
      <title>Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612738#M685362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&amp;nbsp; &lt;/P&gt;&lt;P&gt; I am given a task to calculate the frequency of calls across a territory. If the rep called a physician regarding the sale of the product 5 times, then frequency is 5 and HCP count is 1....I generated frequencies from 1 to 124 in my pivot table using a calculated dimension which is working fine. But my concern is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My manager wants frequencies till 19 in order from 1..2..3..4...5..6.....19... &lt;/P&gt;&lt;P&gt;And from the frequency 21-124 as 20+.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be grateful if someone helps me with this.....Eager for the reply....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 19:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612738#M685362</guid>
      <dc:creator />
      <dc:date>2014-02-05T19:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612739#M685363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can i use class function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 19:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612739#M685363</guid>
      <dc:creator />
      <dc:date>2014-02-05T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612740#M685364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The correct answer in the below link may lead you in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/105764"&gt;Stratification with Rank(Aggr()) as a dimension&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 20:06:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612740#M685364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-05T20:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612741#M685365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can calculate the frequency with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct CallID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want an upper limit, you can use e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Count(distinct CallID)&amp;lt;=20, Count(distinct CallID), '20+')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further, posting the same question in 20+ places on QlikCommunity, in unrelated discussion threads and in unrelated blog posts just irritates people, so that they are less inclined to answer you. &lt;EM&gt;Post the question in one place only.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, if you can post a file with sample data, it would be a lot easier to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 20:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612741#M685365</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-05T20:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612742#M685366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used this calculated dimension to calculate the frequency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isnull(ENTITY_DISPLAY_NAME_VOD_C),aggr(if(count(v_ID_no_Parent)&amp;lt;&amp;gt;0,Count(v_id_no_Parent),[$(vGrp)],PRIMARY_ACCOUNT_C),aggr(if(Count(v_ID_no_Parent)&amp;lt;&amp;gt;0,count(v_ID_no_Parent)),[$(vGrp)],ENTITY_DISPLAY_NAME_VOD_C))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vgrp is for cyclic group ....v_id_no_Parent indicates calls ...rest is to calculate the right HCP count ....we are basically calculating frequencies of calls per territory..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with this...I need the solution asap...Can you people just modify the code according to the requirement...i tried...its not working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 17:30:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612742#M685366</guid>
      <dc:creator />
      <dc:date>2014-02-06T17:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612743#M685367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There seems to me as if there is a bracket missing... The if() inside the first aggr() is not closed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&amp;nbsp; isnull(ENTITY_DISPLAY_NAME_VOD_C),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(count(v_ID_no_Parent)&amp;lt;&amp;gt;0,Count(v_id_no_Pare&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;nt),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [$(vGrp)],PRIMARY_ACCOUNT_C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggr(if(Count(v_ID_no_Parent)&amp;lt;&amp;gt;0,count(v_ID_no_Parent)),[$(vGrp)],ENTITY_DISPLAY_NAME_VOD_C)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would strongly advice you to put such a calculation in the script instead... It very quickly becomes unmanageable. Read this blog post: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/theqlikviewblog/2014/02/03/the-key-to-heaven" title="http://community.qlik.com/blogs/theqlikviewblog/2014/02/03/the-key-to-heaven"&gt;http://community.qlik.com/blogs/theqlikviewblog/2014/02/03/the-key-to-heaven&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 18:02:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612743#M685367</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-06T18:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612744#M685368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abhi,&lt;/P&gt;&lt;P&gt;I just thought that this is very similar to your request, take a look: &lt;A _jive_internal="true" href="https://community.qlik.com/message/463656"&gt;http://community.qlik.com/message/463656&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 18:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612744#M685368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T18:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612745#M685369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey its working. thanks a ton. But it is displaying at the first before the frequency 1.&lt;/P&gt;&lt;P&gt;it looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;20+,1,3,7..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612745#M685369</guid>
      <dc:creator />
      <dc:date>2014-02-06T20:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612746#M685370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The secret is in sorting.&lt;/P&gt;&lt;P&gt;Notice that I made dimension values "dual" - text and number.&amp;nbsp; You can assign number like 99 to the "21+", and sort by numeric value.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612746#M685370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T20:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612747#M685371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used this as my calculated dimension by setting the earlier calculated dimension into a variable vfreqcount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and used =if($(vfreqcount)&amp;lt;21,$(vfreqcount),'20+')....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is displaying 20+ at the start..how to get it to the end after 19&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612747#M685371</guid>
      <dc:creator />
      <dc:date>2014-02-06T20:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612748#M685372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;if($(vfreqcount)&amp;lt;21,$(vfreqcount),&lt;STRONG&gt;dual('20+',99)&lt;/STRONG&gt;)....&lt;/P&gt;&lt;P&gt;Or maybe this, but it looks redundant:&lt;/P&gt;&lt;P&gt;if($(vfreqcount)&amp;lt;21,dual('$(vfreqcount)',$(vfreqcount)),dual('20+',99))....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612748#M685372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T20:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612749#M685373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dual('20+',21) is helping my case..but can you explain me why using dual in this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612749#M685373</guid>
      <dc:creator />
      <dc:date>2014-02-06T20:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612750#M685374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To sort by numeric value, the values must be numeric.&amp;nbsp; The '20+' is text, not a number.&amp;nbsp; The dual() function creates values that have both text and numeric values (hence "dual").&amp;nbsp; In your case, text value '20+' has numeric value 21.&amp;nbsp; So, when you sort by numeric, it follows 20, exactly as you want it.&lt;/P&gt;&lt;P&gt;Note: &lt;EM&gt;Some date/time values are numeric in QV without using dual().&amp;nbsp; Months Jan to Dec has numeric values 1 to 12.&amp;nbsp; Weekdays Mon to Sun has numeric values 0 to 6.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612750#M685374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T20:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612751#M685375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still getting wierd values for some territories. Call count is not matching....when i was testing the app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 20:55:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612751#M685375</guid>
      <dc:creator />
      <dc:date>2014-02-06T20:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Range</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612752#M685376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't help with the counts, sorry.&amp;nbsp; It is about the details of your application and calculations.&amp;nbsp; I hope you'll figure out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 21:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-of-Range/m-p/612752#M685376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T21:08:10Z</dc:date>
    </item>
  </channel>
</rss>

