<?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 Current Selections in a Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174194#M43103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kirsten&lt;/P&gt;&lt;P&gt;played around a little bit but could not make it work, tried&lt;/P&gt;&lt;P&gt;count({&amp;lt;date2={"$(=if(findoneof(getfieldselections(date1),date2)&amp;gt;0,date2)"}&amp;gt;} d1)&lt;/P&gt;&lt;P&gt;but as&lt;/P&gt;&lt;P&gt;if(findoneof(getfieldselections(date1),date2)&amp;gt;0,date2)&lt;/P&gt;&lt;P&gt;works it does not work in the set analysis.&lt;/P&gt;&lt;P&gt;So my only solution is&lt;/P&gt;&lt;P&gt;count( DISTINCT if(substringcount(getfieldselections(date1),date2)&amp;gt;0,key))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jürg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jun 2010 07:07:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-03T07:07:30Z</dc:date>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174188#M43097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to calculate a count of all records when date1 is selected where date2 is within the date1 selected.&lt;/P&gt;&lt;P&gt;So, if current selection of date1_MY = date2_MY then count&lt;/P&gt;&lt;P&gt;Anyone know of a function I can call?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 15:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174188#M43097</guid>
      <dc:creator />
      <dc:date>2010-06-02T15:58:04Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174189#M43098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kristen&lt;/P&gt;&lt;P&gt;Does this show your expected count?&lt;/P&gt;&lt;P&gt;sum(if(date1=date2,1))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 16:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174189#M43098</guid>
      <dc:creator />
      <dc:date>2010-06-02T16:06:22Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174190#M43099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Juerg,&lt;/P&gt;&lt;P&gt;Not exactly. Say for date1 Jan-2010 and Feb-2010 were selected. The row can have date1=Jan-2010 and date2=Feb-2010. I still want to add that in my count.&lt;/P&gt;&lt;P&gt;I think I might need to use getcurrentselections() or something like that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 16:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174190#M43099</guid>
      <dc:creator />
      <dc:date>2010-06-02T16:13:50Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174191#M43100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kirsten&lt;/P&gt;&lt;P&gt;You are thinking of something like&lt;/P&gt;&lt;P&gt;sum(if(substringcount(getfieldselections(date1),date2)&amp;gt;0,1))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 16:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174191#M43100</guid>
      <dc:creator />
      <dc:date>2010-06-02T16:48:46Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174192#M43101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Juerg,&lt;/P&gt;&lt;P&gt;I was playing with something like:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Count ({&amp;lt; Date2_MY = {"$(=GetFieldSelections(Date1_MY))"} &amp;gt;} DISTINCT key)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I can get it working if one date1_MY is selected but not mulitiple ones.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 16:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174192#M43101</guid>
      <dc:creator />
      <dc:date>2010-06-02T16:57:05Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174193#M43102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kristen&lt;/P&gt;&lt;P&gt;For multiple selections GefFieldSelections will return more than one month which will then not match your Date2_MY. You should try to get rid of the month's not matching Date2_MY. Do not see a way myself to make this work, sorry&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 17:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174193#M43102</guid>
      <dc:creator />
      <dc:date>2010-06-02T17:28:52Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174194#M43103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kirsten&lt;/P&gt;&lt;P&gt;played around a little bit but could not make it work, tried&lt;/P&gt;&lt;P&gt;count({&amp;lt;date2={"$(=if(findoneof(getfieldselections(date1),date2)&amp;gt;0,date2)"}&amp;gt;} d1)&lt;/P&gt;&lt;P&gt;but as&lt;/P&gt;&lt;P&gt;if(findoneof(getfieldselections(date1),date2)&amp;gt;0,date2)&lt;/P&gt;&lt;P&gt;works it does not work in the set analysis.&lt;/P&gt;&lt;P&gt;So my only solution is&lt;/P&gt;&lt;P&gt;count( DISTINCT if(substringcount(getfieldselections(date1),date2)&amp;gt;0,key))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jürg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jun 2010 07:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174194#M43103</guid>
      <dc:creator />
      <dc:date>2010-06-03T07:07:30Z</dc:date>
    </item>
    <item>
      <title>Current Selections in a Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174195#M43104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jurg for looking into it!&lt;/P&gt;&lt;P&gt;Here is how I finally got it to work:&lt;/P&gt;&lt;P&gt;I first created a variable and named it vActiveDateMY. Then I set the value to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;'"'&amp;amp;&lt;B&gt;GetFieldSelections&lt;/B&gt;(&lt;B&gt;Date1_MY&lt;/B&gt;,'","')&amp;amp;'"'&lt;/P&gt;&lt;P&gt;This set up the variable to go into the set analysis in a way it can understand it. Like if a Jan, Feb, March of 2010 were selected it would show&lt;/P&gt;&lt;P&gt;"Jan-2010","Feb-2010","Mar-2010"&lt;/P&gt;&lt;P&gt;Then I made my expression:&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Count ({&amp;lt; Date2_MY = {$(=vActiveDateMY)} &amp;gt;} DISTINCT Key))&lt;/P&gt;&lt;P&gt;Another thing I had to add was if no months are selected to count all distinct keys but that is the idea anyway if anyone else is stuck on the same problem.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jun 2010 14:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Selections-in-a-Calculation/m-p/174195#M43104</guid>
      <dc:creator />
      <dc:date>2010-06-03T14:38:17Z</dc:date>
    </item>
  </channel>
</rss>

