<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255833#M1196303</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 new to QV and I'm battling with the set analysis function. My QV application is for a drilling company (4 different companies) and I have joined the Journals and Documents table from SQL. My problem is that a &lt;SPAN style="text-decoration: underline;"&gt;project&lt;/SPAN&gt; only appear in the journal fact table once an invoice or credit memo are posted but appear in the documents fact table for all documents. To distinguish (create a link) for the different projects and different companies I have added a prefix to each project (eg 'SA' for the South Africa and 'GH' for Ghana. So in my QV script I have - Left(Project,2) as JCompany on the Journals Load and ﻿﻿﻿﻿Left(Project,2) as TCompany on the Documents load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿When I sum for 'MetersDrilled' I want the set analysis to disregard the fact that the current selection for company = JCompany but instead to calculate 'MetersDrilled' based on the selection Company = TCompany.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿=Sum({$&amp;lt;ItmsGrpCod={'137'},&lt;EM&gt;&lt;SPAN style="color: #000080;"&gt;TCompany = {'SA','GH','WA','GR'}&lt;/SPAN&gt;,&lt;/EM&gt;ObjType={'13',14'}&amp;gt;}Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part in &lt;EM&gt;italics &lt;/EM&gt;is where I'm struggling. So in other words I want the application to disregard the current selections except for ItmsGrpCod = 137 &lt;/P&gt;&lt;P&gt;and TCompany = 'SA, GH , WA or DR' and ObjType = 13 or 14. If I use 1 instead of $ I get the right result but then the the total remains the same when I select a different value from the Project choose list or when I select a different month etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess my question is - I want the sum(Qty) to change when I select other dimensions but it must always be based on the Company selected in TCompany and disregarding JCompany.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Danie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2011 09:28:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-01T09:28:28Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255833#M1196303</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 new to QV and I'm battling with the set analysis function. My QV application is for a drilling company (4 different companies) and I have joined the Journals and Documents table from SQL. My problem is that a &lt;SPAN style="text-decoration: underline;"&gt;project&lt;/SPAN&gt; only appear in the journal fact table once an invoice or credit memo are posted but appear in the documents fact table for all documents. To distinguish (create a link) for the different projects and different companies I have added a prefix to each project (eg 'SA' for the South Africa and 'GH' for Ghana. So in my QV script I have - Left(Project,2) as JCompany on the Journals Load and ﻿﻿﻿﻿Left(Project,2) as TCompany on the Documents load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿When I sum for 'MetersDrilled' I want the set analysis to disregard the fact that the current selection for company = JCompany but instead to calculate 'MetersDrilled' based on the selection Company = TCompany.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿=Sum({$&amp;lt;ItmsGrpCod={'137'},&lt;EM&gt;&lt;SPAN style="color: #000080;"&gt;TCompany = {'SA','GH','WA','GR'}&lt;/SPAN&gt;,&lt;/EM&gt;ObjType={'13',14'}&amp;gt;}Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part in &lt;EM&gt;italics &lt;/EM&gt;is where I'm struggling. So in other words I want the application to disregard the current selections except for ItmsGrpCod = 137 &lt;/P&gt;&lt;P&gt;and TCompany = 'SA, GH , WA or DR' and ObjType = 13 or 14. If I use 1 instead of $ I get the right result but then the the total remains the same when I select a different value from the Project choose list or when I select a different month etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess my question is - I want the sum(Qty) to change when I select other dimensions but it must always be based on the Company selected in TCompany and disregarding JCompany.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Danie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 09:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255833#M1196303</guid>
      <dc:creator />
      <dc:date>2011-06-01T09:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255834#M1196304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Danie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood right, you only want to ignore selections done in field JCompany, then the following expression should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({$&amp;lt; &lt;STRONG&gt;JCompany =,&lt;/STRONG&gt; ItmsGrpCod = {137}, TCompany = {'SA', 'GH', 'WA', 'GR'}, ObjType = {13, 14} &amp;gt;} Qty)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 09:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255834#M1196304</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-01T09:48:15Z</dc:date>
    </item>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255835#M1196305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thx Miguel - worked like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 14:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/255835#M1196305</guid>
      <dc:creator />
      <dc:date>2011-06-01T14:43:37Z</dc:date>
    </item>
  </channel>
</rss>

