<?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 Simple set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158403#M33487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xena&lt;/P&gt;&lt;P&gt;I think I would do the AC part in a variable, so declare a variable and make the content of the variable as follows:&lt;/P&gt;&lt;P&gt;=GetFieldSelections("AC") - 101&lt;/P&gt;&lt;P&gt;Let's assume you call your variable ACMod, then your set analysis expression would be:&lt;/P&gt;&lt;P&gt;=Count({$&amp;lt;Ac={$(ACMod)}&amp;gt;} Distinct [Prog] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Nov 2009 20:16:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-19T20:16:41Z</dc:date>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158402#M33486</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'm trying to return a value based on the current selection (0910) in a list-box.&lt;/P&gt;&lt;P&gt;So, for example if a user selects Ac=0910, I want to return 0809 = 0910-101. ie. Ac-101.&lt;/P&gt;&lt;P&gt;or if the user selects 0809, then it must return 0708, etc etc.....&lt;/P&gt;&lt;P&gt;It will always be 101 less than current selection.&lt;/P&gt;&lt;P&gt;Here is the start of my expression :&lt;/P&gt;&lt;P&gt;count( {$&amp;lt;Ac = {$(=Ac-'101')}&amp;gt;} distinct [Prog] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure someone has done a similar expression before.&lt;/P&gt;&lt;P&gt;Much appreciated,&lt;/P&gt;&lt;P&gt;Xena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 20:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158402#M33486</guid>
      <dc:creator />
      <dc:date>2009-11-19T20:08:58Z</dc:date>
    </item>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158403#M33487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Xena&lt;/P&gt;&lt;P&gt;I think I would do the AC part in a variable, so declare a variable and make the content of the variable as follows:&lt;/P&gt;&lt;P&gt;=GetFieldSelections("AC") - 101&lt;/P&gt;&lt;P&gt;Let's assume you call your variable ACMod, then your set analysis expression would be:&lt;/P&gt;&lt;P&gt;=Count({$&amp;lt;Ac={$(ACMod)}&amp;gt;} Distinct [Prog] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 20:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158403#M33487</guid>
      <dc:creator />
      <dc:date>2009-11-19T20:16:41Z</dc:date>
    </item>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158404#M33488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try&lt;/P&gt;&lt;P&gt;count( {$&amp;lt;Ac = {'$(=Ac-101)'}&amp;gt;} distinct [Prog] ) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 20:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158404#M33488</guid>
      <dc:creator />
      <dc:date>2009-11-19T20:27:03Z</dc:date>
    </item>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158405#M33489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nigel, Spastor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both expressions return a value of 0.&lt;/P&gt;&lt;P&gt;I did test the variable in a listbox, but that is correct.&lt;/P&gt;&lt;P&gt;Not sure what else could be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 20:30:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158405#M33489</guid>
      <dc:creator />
      <dc:date>2009-11-19T20:30:15Z</dc:date>
    </item>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158406#M33490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that you are selecting a value (for example 903) in the field AC.&lt;/P&gt;&lt;P&gt;Therefore your current selection is made on AC=903.&lt;/P&gt;&lt;P&gt;The Set analysis will take the values inside your selection where AC=903.&lt;/P&gt;&lt;P&gt;What I would do is creating a Table with two fields: First field is AC ( renamed as AC_REFERENCE) and the second one is NUMBER_AC_TO_SELECT which is AC-101.&lt;/P&gt;&lt;P&gt;Then you base your Set analysis based on AC={s(=only(NUMBER_AC_TO_SELECT))}&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sébastien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 21:39:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158406#M33490</guid>
      <dc:creator />
      <dc:date>2009-11-19T21:39:38Z</dc:date>
    </item>
    <item>
      <title>Simple set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158407#M33491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Spastor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick response.&lt;/P&gt;&lt;P&gt;Yes, I came up with that solution which seems to work.&lt;/P&gt;&lt;P&gt;I figured it had something to do with the 0 in front of AC.&lt;/P&gt;&lt;P&gt;I just created a quick ref/mapping table, which worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 21:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-set-analysis/m-p/158407#M33491</guid>
      <dc:creator />
      <dc:date>2009-11-19T21:46:25Z</dc:date>
    </item>
  </channel>
</rss>

