<?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: Get Selected Count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85765#M14072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, it's hard to debug a formula I can't see, so a screen capture doesn't help here. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2018 10:39:52 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2018-09-05T10:39:52Z</dc:date>
    <item>
      <title>Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85760#M14067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Project_Type and the Projected_Hours for those project types in my data model.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212440" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212440_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212444" alt="Capture2.JPG" class="jive-image image-2" height="276" src="https://community.qlik.com/legacyfs/online/212444_Capture2.JPG" style="height: 276.25px; width: 527px;" width="527" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where the user will select &lt;EM&gt;n&lt;/EM&gt; number of&amp;nbsp; projects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the below snapshot, I have select 3 TypeA projects. So hours used when a resource is assigned those 3 projects will be 3*2=6 hours. So remaining hours for that resource will be 40-6=34 (Assuming each resource works 40 hours a week).&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212445" alt="Capture3.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/212445_Capture3.JPG" style="height: 342px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Similarly, If 2 TypeB project are selected, &lt;SPAN style="font-size: 13.3333px;"&gt;hours used when a resource is assigned&amp;nbsp; projects will be 2*6=12 hours. So remaining hours for that resource will be 40-12=28&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG __jive_id="212446" alt="Capture3.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/212446_Capture3.JPG" style="height: 326px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example, I have select 2,3 projects from SAME project types. But the user can select projects from different Project_Types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that scenario, what should be the expression? The expression which I have used to calculate &lt;EM&gt;Hours Used&lt;/EM&gt; is (GetSelectedCount([Project Name])*[Projected Hours])&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212447" alt="Capture3.JPG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/212447_Capture3.JPG" style="height: 476px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this works only when the ProjectType is same. When I select 1 project of TypeA and 3 projects of TypeC, the expression fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I tweak my expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have made the requirement clear. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;YASH&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 07:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85760#M14067</guid>
      <dc:creator>yashcena</dc:creator>
      <dc:date>2018-09-03T07:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85761#M14068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There may be cleaner ways to do this, but since your tables aren't actually joined in any way, I'd use aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(total aggr(sum( [Projected Hours])*count(distinct&amp;nbsp; [Project Name]),[Project Type]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 08:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85761#M14068</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-09-03T08:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85762#M14069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! this expression worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one more question. I also need to give user the ability to enter the number of projects of a particular type &lt;/P&gt;&lt;P&gt;(I'm using slider for user input).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created 3 variables vTypeA, vTypeB and vTypeC and put there sum in another variable vAll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there seems to be something which I'm missing. I have selected 1 project of each type through slider.&lt;/P&gt;&lt;P&gt;But instead of calculating (2x1)+(6x1)+(10x1), it is calculating (2+6+10)*3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212687_Capture3.JPG" style="height: 294px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this via sliders? I have attached the updated app with the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help again. Appreciate a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 09:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85762#M14069</guid>
      <dc:creator>yashcena</dc:creator>
      <dc:date>2018-09-05T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85763#M14070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing is attached..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85763#M14070</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-09-05T10:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85764#M14071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached the pp in the question itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85764#M14071</guid>
      <dc:creator>yashcena</dc:creator>
      <dc:date>2018-09-05T10:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Selected Count</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85765#M14072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, it's hard to debug a formula I can't see, so a screen capture doesn't help here. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Selected-Count/m-p/85765#M14072</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-09-05T10:39:52Z</dc:date>
    </item>
  </channel>
</rss>

