<?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: Using a field of multiple values in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711091#M256114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't there anyway to substitute the whole field like it is a variable? So it can just be something like:&lt;/P&gt;&lt;P&gt;DEPT=MANGERSDEPT.....which is the same as DEPT={'A'.'B','C}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2014 02:17:22 GMT</pubDate>
    <dc:creator>zagzebski</dc:creator>
    <dc:date>2014-07-04T02:17:22Z</dc:date>
    <item>
      <title>Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711085#M256108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a field in my source that I can ultimately use in my set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field is called DeptFilter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put multiple values in the DeptFilter field like:&amp;nbsp; B,F.G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I wan to use it in set analysis like: Sum({$&amp;lt;[Dept]=[DeptFilter]&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in the above expression I want the set to sum the revenue only if the Dept = B, F or G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my source file I can bring the data in anyway that makes sense:&lt;/P&gt;&lt;P&gt;B,F,G&lt;/P&gt;&lt;P&gt;'B','F','G'&lt;/P&gt;&lt;P&gt;('B','F','G')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my two questions are:&lt;/P&gt;&lt;P&gt;1. How should I structure the 3 values in the DeptFilter field in my source&lt;/P&gt;&lt;P&gt;2. Then how would the expression look?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711085#M256108</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2014-07-04T01:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711086#M256109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[Dept]=P(subfield(Dept,1), [Dept]=P(subfield(Dept,2) , .....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711086#M256109</guid>
      <dc:creator />
      <dc:date>2014-07-04T01:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711087#M256110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if it could vary? Since the DeptFilter is tied to the a manager it could be 1 to many departments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DeptFilter=A&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;DeptFilter = B or C&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;DeptFilter = D, E, or F&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:22:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711087#M256110</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2014-07-04T01:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711088#M256111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum({&amp;lt;Dept=P(&amp;lt;Dept=SubField(Dept,',',1) Dept) + P(&amp;lt;Dept=SubField(Dept,',',2) Dept) + P(&amp;lt;Dept=SubField(Dept,',',3) Dept) &amp;gt;}Revenue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:22:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711088#M256111</guid>
      <dc:creator />
      <dc:date>2014-07-04T01:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711089#M256112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I am not asking right I will try a different way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt; I create a field called MANAGERSDEPT. One of its values is&amp;nbsp; {'A','B','C'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than this expression&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DEPT={'A",'B',"C'}&amp;gt;)Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DEPT='MANAGERSDEPT'&amp;gt;}Revenue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711089#M256112</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2014-07-04T01:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711090#M256113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum({&amp;lt;DEPT={$(=Subfield(MANAGERSDEPT,',',1)}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DEPT={$(=Subfield(MANAGERSDEPT,',',2)}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DEPT={$(=Subfield(MANAGERSDEPT,',',3)}&amp;gt;}Revenue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 01:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711090#M256113</guid>
      <dc:creator />
      <dc:date>2014-07-04T01:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711091#M256114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't there anyway to substitute the whole field like it is a variable? So it can just be something like:&lt;/P&gt;&lt;P&gt;DEPT=MANGERSDEPT.....which is the same as DEPT={'A'.'B','C}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 02:17:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711091#M256114</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2014-07-04T02:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711092#M256115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try may be like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if (wildmatch(dept,managersdept), revenue))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 02:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711092#M256115</guid>
      <dc:creator />
      <dc:date>2014-07-04T02:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711093#M256116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;create variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest = chr(39) &amp;amp; Concat(DISTINCT FieldName, chr(39) &amp;amp; ',' &amp;amp; Chr(39) ) &amp;amp; chr(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in expression simply use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;SomeOtherFieldName={$(=vTest )}&amp;gt;} MeasureName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 03:48:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711093#M256116</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-07-04T03:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711094#M256117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks I am going to try this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2014 15:56:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711094#M256117</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2014-07-05T15:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using a field of multiple values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711095#M256118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks This works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 15:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-field-of-multiple-values-in-set-analysis/m-p/711095#M256118</guid>
      <dc:creator>nlagosbu</dc:creator>
      <dc:date>2018-02-08T15:13:21Z</dc:date>
    </item>
  </channel>
</rss>

