<?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 Set Analysis - Use what is Filtered Explicitly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816394#M287931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still working on my set analysis with different Objects (Pencils, Pens, Crayons) - in my real example I have dates that are nearly always filtered to a time frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to filter to a Pencil and it show me the total for the filtered time range.&amp;nbsp;&amp;nbsp; This sounds so easy but I'm still struggling with Set Analysis in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current approach is give me the total for the possible dates using P().&amp;nbsp;&amp;nbsp; However this is NOT the same as what timeframe is being filtered to.&amp;nbsp;&amp;nbsp; What P() is giving me are the totals for the dates that apply to that filtered object list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below - I would expect the total Q(last column) for Pencils between the period of 6/1 through 12/1.&amp;nbsp; As you can see as I cycle between store B and C it changes from 60 to 70.&amp;nbsp;&amp;nbsp; I know this is because of how possible P() function works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) might be the key but as I try to build out a string and use it in set analysis, things like NOT x, y, z seem to get in the way.&amp;nbsp;&amp;nbsp; Before I invest more time - is there any easier way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;IMG alt="Store_B.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79655_Store_B.JPG" style="width: 620px; height: 212px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Store_C.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/79656_Store_C.JPG" style="width: 620px; height: 231px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Mar 2015 19:12:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-02T19:12:41Z</dc:date>
    <item>
      <title>Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816394#M287931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still working on my set analysis with different Objects (Pencils, Pens, Crayons) - in my real example I have dates that are nearly always filtered to a time frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to filter to a Pencil and it show me the total for the filtered time range.&amp;nbsp;&amp;nbsp; This sounds so easy but I'm still struggling with Set Analysis in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current approach is give me the total for the possible dates using P().&amp;nbsp;&amp;nbsp; However this is NOT the same as what timeframe is being filtered to.&amp;nbsp;&amp;nbsp; What P() is giving me are the totals for the dates that apply to that filtered object list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below - I would expect the total Q(last column) for Pencils between the period of 6/1 through 12/1.&amp;nbsp; As you can see as I cycle between store B and C it changes from 60 to 70.&amp;nbsp;&amp;nbsp; I know this is because of how possible P() function works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) might be the key but as I try to build out a string and use it in set analysis, things like NOT x, y, z seem to get in the way.&amp;nbsp;&amp;nbsp; Before I invest more time - is there any easier way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trans_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;IMG alt="Store_B.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79655_Store_B.JPG" style="width: 620px; height: 212px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Store_C.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/79656_Store_C.JPG" style="width: 620px; height: 231px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 19:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816394#M287931</guid>
      <dc:creator />
      <dc:date>2015-03-02T19:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816395#M287932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression instead for Total Quantity: &lt;STRONG&gt;=Sum({&amp;lt;StoreName = &amp;gt;}Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 19:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816395#M287932</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-02T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816396#M287933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I were to go that route, I'm assuming I would need to include all the available fields that could be filtered on as in my real world file there are 50+ ways to slice the data down.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 20:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816396#M287933</guid>
      <dc:creator />
      <dc:date>2015-03-02T20:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816397#M287934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well so here you are just telling the expression not to change with change in StoreName. I guess do you have a lot of field names where you don't want your expression to change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 20:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816397#M287934</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-02T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816398#M287935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes there are a lot of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess I want the total for the object to ignore all filters except the time domain.&amp;nbsp;&amp;nbsp; I think I've seen this on community elsewhere that uses $Fields.&amp;nbsp;&amp;nbsp; I'll probably need to go that direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 20:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816398#M287935</guid>
      <dc:creator />
      <dc:date>2015-03-02T20:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816399#M287936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I rewrote it using the expression found here: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1334"&gt;http://community.qlik.com/docs/DOC-1334&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started with what was provided on that link to ignore all except Trans_Date.&amp;nbsp; Then added in the P(ObjectID) and excluded it from the filters that are ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;{$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ObjectID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[$(='[' &amp;amp; Concat({1&amp;lt;$Field-={'Trans_Date','ObjectID'}&amp;gt;}distinct $Field,']&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[')&amp;amp;']&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=')&amp;gt;} Quantity) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I'm getting the functionality that I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select "Pencil" and "Store B" both the ignore storename set analysis expression ( &lt;STRONG&gt;=Sum({&amp;lt;StoreName = &amp;gt;}Quantity) )&lt;/STRONG&gt; and the new expression above give the same answer.&amp;nbsp;&amp;nbsp; See the total quantity on the upper table and lower table are both "130"&lt;IMG alt="Ignore_Store_v_Exclude_All_But_1.JPG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79726_Ignore_Store_v_Exclude_All_But_1.JPG" style="width: 620px; height: 478px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I click on Rating = 10 (what shows in white above).&amp;nbsp;&amp;nbsp; Here you can see the difference.&amp;nbsp;&amp;nbsp; The new expression still reads 130 - like I need it to.&amp;nbsp;&amp;nbsp; The top one shows 70 as expected but not what is wanted.&amp;nbsp;&amp;nbsp;&amp;nbsp; I like this solution as it is dynamic as I add more fields/filters/etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Ignore_Store_v_Exclude_All_But_1_B.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/79730_Ignore_Store_v_Exclude_All_But_1_B.JPG" style="width: 620px; height: 402px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:13:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816399#M287936</guid>
      <dc:creator />
      <dc:date>2015-03-03T13:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Use what is Filtered Explicitly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816400#M287937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for taking out time to post your solution here. I am sure a lot of people will find this useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:41:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Use-what-is-Filtered-Explicitly/m-p/816400#M287937</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-03T13:41:55Z</dc:date>
    </item>
  </channel>
</rss>

