<?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: GetFieldSelection - Multiple Selection Values in Count(If) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448732#M486097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are pretty much set with your data model, is this your original work already?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your bar chart expressions, you can use these three:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'Employee'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'End_Date'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'Promo Date'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Mar 2013 20:35:51 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-03-17T20:35:51Z</dc:date>
    <item>
      <title>GetFieldSelection - Multiple Selection Values in Count(If)</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448729#M486093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;Good Evening&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;I am trying to create a chart that shows the values based on a Year Selection from my Master Calendar.&amp;nbsp; I am using the formula below&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;COUNT&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;IF&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;YEAR&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;[CONTRACT END DATE]&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)=&lt;/SPAN&gt;GetFieldSelections&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Year&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;This works fine if I only select one value (for example - Year = 2012), however, if I select a number of values, then obviously, it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Is there a formula/adjustment that I can make so that if I select multiple values, I get the correct count?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Mar 2013 18:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448729#M486093</guid>
      <dc:creator />
      <dc:date>2013-03-17T18:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelection - Multiple Selection Values in Count(If)</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448730#M486095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Sum(if( Match(Year([CONTRACT END DATE]), $(=GetFieldSelections(Year)) ),1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which should work, but is not very performant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Year in your master calendar would be linked to CONTRACT END DATE,&amp;nbsp; this would make the task almot trivial (remember you can create multiple master calendar).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could create an additional&amp;nbsp; [CONTRACT END YEAR] field from your date in the same table, you can use a simple set expression to calculate your number:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;[CONTRACT END YEAR] = Year&amp;gt;} [CONTRACT END YEAR])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Mar 2013 19:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448730#M486095</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-03-17T19:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelection - Multiple Selection Values in Count(If)</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448731#M486096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will look into this, to give a bit more insight, what I am trying to do is display on a graph the Joiners and Leavers of a company based on a selection from the Master Calendar (i.e. If I Select 2010, 2011, 2012 &amp;amp; 2013, I want to see the numbers for those who have joined and those who have left).&amp;nbsp; Maybe I'm approaching this from completely the wrong angle?&amp;nbsp; I'm still fairly new to QlikView.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My qvw can be found on the attached link, if it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/kbnj53b4glnde10/Date%20Selections%20Test%201.qvw"&gt;https://www.dropbox.com/s/kbnj53b4glnde10/Date%20Selections%20Test%201.qvw&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Mar 2013 20:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448731#M486096</guid>
      <dc:creator />
      <dc:date>2013-03-17T20:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelection - Multiple Selection Values in Count(If)</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448732#M486097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are pretty much set with your data model, is this your original work already?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your bar chart expressions, you can use these three:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'Employee'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'End_Date'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DateType = {'Promo Date'}&amp;gt;}&amp;nbsp; EMPLOYEE_ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Mar 2013 20:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448732#M486097</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-03-17T20:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelection - Multiple Selection Values in Count(If)</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448733#M486098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent, thanks for assistance on the expressions, this really helps.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Data Model was assisted by reading through the "QlkiView 11 for Developers" by Miguel Garcia and Barry Harmsen and also a few threads on here, particularly with regards to the MapLink table, I used a qvw that Rob Wunderlich linked to on this thread (&lt;A _jive_internal="true" href="https://community.qlik.com/message/320160#320160"&gt;http://community.qlik.com/message/320160#320160&lt;/A&gt;) and applied it to my data.&amp;nbsp; It was very useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Mar 2013 20:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelection-Multiple-Selection-Values-in-Count-If/m-p/448733#M486098</guid>
      <dc:creator />
      <dc:date>2013-03-17T20:56:00Z</dc:date>
    </item>
  </channel>
</rss>

