<?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: Set Analysis groups in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570200#M212456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InvoiceNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartNumber&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Sales)&lt;/P&gt;&lt;P&gt;Resident TableName&lt;/P&gt;&lt;P&gt;Group By CustomerID, InvoiceNumber, PartNumber;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2014 10:14:54 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-03-13T10:14:54Z</dc:date>
    <item>
      <title>Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570186#M212442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a formula which looks if a company had revenue in 2012 and not in 2013. In that case it should be called "Stopped", otherwise it is "Active". The set analysis to achieve this looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum({&amp;lt; Year = {'2012'}&amp;gt;} Revenue)&amp;gt;0 AND sum({&amp;lt; Year = {'2013'}&amp;gt;} Revenue)=0, 'Stopped', 'Active')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula works great in a table. But what I need is this to be loaded in the script, so I can use the Stopped field in other set analysis and in a listbox so the stopped companies can be excluded from selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But even pasting this formula in a listbox doesn't work, also the set analysis doesn't work in the script.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570186#M212442</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T08:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570187#M212443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set Analysis is not supporting in SCRIPT...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to change your script something like below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Stopped' as Flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Revenue&lt;/P&gt;&lt;P&gt;Resident TableName&lt;/P&gt;&lt;P&gt;Where Year = 2012 and Revenue &amp;gt; 0 or Year = 2013&amp;nbsp; and Revenue = 0 // or use Where Year = '2012' and Revenue &amp;gt; '0'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join (YourFactTable)&lt;/P&gt;&lt;P&gt;Load * Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YourFactTableFinal:&lt;/P&gt;&lt;P&gt;Load *, If(Flag &amp;lt;&amp;gt; 'Stopped', 'Active') as Flag Resident YourFactTable;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drop Tables YourFactTable, Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570187#M212443</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-13T08:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570188#M212444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I load the first temp table with the revenue and the year. Where do I load this from? My fact table or do I create a separate load from the source?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570188#M212444</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T08:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570189#M212445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;Use a Variable like&lt;/P&gt;&lt;P&gt;Let Var=if(sum({&amp;lt; Year = {'2012'}&amp;gt;} Revenue)&amp;gt;0 AND sum({&amp;lt; Year = {'2013'}&amp;gt;} Revenue)=0, 'Stopped', 'Active')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in your list box Expression&lt;/P&gt;&lt;P&gt;Write&lt;/P&gt;&lt;P&gt;If(not isNull('Filed') , var,0) then it will show only active status companies&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570189#M212445</guid>
      <dc:creator />
      <dc:date>2014-03-13T08:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570190#M212446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not taking set analysis in a let function in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570190#M212446</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T08:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570191#M212447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create&amp;nbsp; variable at settings ---&amp;gt; Variable Over view .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 08:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570191#M212447</guid>
      <dc:creator />
      <dc:date>2014-03-13T08:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570192#M212448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep it simple in the script&amp;nbsp; - load an if statement inside the sum instead of set analysis to return the 2012 /2013 revenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CompaniesData:&lt;/P&gt;&lt;P&gt;Load CompanyID,&lt;/P&gt;&lt;P&gt;if( sum(if(Year = '2012',Revenue,0)) &amp;gt;0 and sum(if(Year = '2013',Revenue,0)) =0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Stopped','Active')&lt;/P&gt;&lt;P&gt;from FactTable group by company;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570192#M212448</guid>
      <dc:creator />
      <dc:date>2014-03-13T09:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570193#M212449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ps I would probably use the same approach as you - keeping it in the script. Depending on your data structure this will keep things quicker in the app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570193#M212449</guid>
      <dc:creator />
      <dc:date>2014-03-13T09:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570194#M212450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make the script take SUM? As far as I know you can't put the sum statement in a script (I get an error which tells me it is an invalid expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:07:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570194#M212450</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T09:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570195#M212451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check updated file...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570195#M212451</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-13T09:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570196#M212452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to add a "group by" to the end of the load statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load A, sum(b) resident table group by A;;&lt;/P&gt;&lt;P&gt;Otherwise reply with your statement so we can see what the problem is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 09:52:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570196#M212452</guid>
      <dc:creator />
      <dc:date>2014-03-13T09:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570197#M212453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it matter which field I use for the group by?&lt;/P&gt;&lt;P&gt;I do a group by company but it still gives an error, invalid expression.&lt;/P&gt;&lt;P&gt;See attached how that part of the script looks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570197#M212453</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T10:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570198#M212454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load Company,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(YourField)&lt;/P&gt;&lt;P&gt;Resident YourTableName&lt;/P&gt;&lt;P&gt;Group By Company;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570198#M212454</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-13T10:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570199#M212455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly how I have it (little longer load script), see attached&lt;/P&gt;&lt;P&gt;Still returns the invalid expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570199#M212455</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T10:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570200#M212456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InvoiceNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartNumber&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Sales)&lt;/P&gt;&lt;P&gt;Resident TableName&lt;/P&gt;&lt;P&gt;Group By CustomerID, InvoiceNumber, PartNumber;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570200#M212456</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-13T10:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570201#M212457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do a second load only with the sum and the company and join that to the fact load it works.&lt;/P&gt;&lt;P&gt;Thanks both Manish and Erica for your quick help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:17:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570201#M212457</guid>
      <dc:creator>pauldamen</dc:creator>
      <dc:date>2014-03-13T10:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570202#M212458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's because you&amp;nbsp; need to group by the fields that do not have an aggregate expression (eg sum, avg, min...), otherwise qlikview does not know what to do with them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence putting it in a separate, simpler table and&amp;nbsp; then either joining it back on or keeping it as a lookup is the easiest way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join (facttable) Load company, if(sum(if(....)) and sum(if(..))).. as expression resident facttable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570202#M212458</guid>
      <dc:creator />
      <dc:date>2014-03-13T10:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis groups</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570203#M212459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is difficult to group by 5 or 10 items. Better to load only 2-3 fields and group by in second table and join these two tables... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 10:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-groups/m-p/570203#M212459</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-13T10:49:37Z</dc:date>
    </item>
  </channel>
</rss>

