<?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 and Variables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290937#M1194130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I'm not giving enough info. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vProd1 variable actually is a drop down selector.&amp;nbsp; The Product Names (which appears in the drop down selector) are already defined in a table.&amp;nbsp; Within the Product Name itself contains either "ProdA" or "ProdB."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So essentially, it goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. User has a drop down input selector.&amp;nbsp; He/she chooses a Product: ShoesProdA. &lt;/P&gt;&lt;P&gt;2. ShoesProdA appears in the straight table with a value of 4. Essential vProd1 (the variable) gets replaced with ShoesProdA, with a value of 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user has up to 30 products that they can select (in my example, I only went up to 4 hence: vProd1, vProd2....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that clears things up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2011 15:26:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-19T15:26:12Z</dc:date>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290932#M1194123</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;How do I set up set analysis (with variables) to sum up specific values contained in the output of the variables?&amp;nbsp; Here's an example expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;=sum({&amp;lt;Product.ProdName={'$(vProd1)'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product.ProdValue) + sum({&amp;lt;Product.ProdName={'$(vProd2)'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product.ProdValue) + sum({&amp;lt;Product.ProdName={'$(vProd3)'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product.ProdValue) + sum({&amp;lt;Product.ProdName={'$(vProd4)'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product.ProdValue)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above expression works absolutely fine.&amp;nbsp; I need a totals column. That being said, the values contained in vProd1, vProd2, (so on...) contain either a "ProdA" or "ProdB" contained in the ProductName (which is pulled in based on the variable).&amp;nbsp; I need to sum up all values containing "ProdA" and sum up all values containing "ProdB" each in it's own column.&amp;nbsp; What's the best way of accomplishing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also...&amp;nbsp; I have to imagine this can be highly intensive (or could be).&amp;nbsp; I've provided a highly shorted version of this expression above.&amp;nbsp; Additionally, there are always hundreds of Products being added everyday.&amp;nbsp; So, I don't want to run into an "Out of memory" situation.&amp;nbsp; So also looking for efficient ways of handling this situation as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 13:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290932#M1194123</guid>
      <dc:creator />
      <dc:date>2011-07-19T13:58:02Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290933#M1194125</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;you can use set expression also with search strings, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Product.ProdName={"*ProdA*"}&amp;gt;} Product.ProdValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which should limit the ProdNames to those containing ProdA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you might want to have a look at the wildmatch() function, you can call functions from set expression using dollar sign expansion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 14:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290933#M1194125</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T14:29:30Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290934#M1194126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;me again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just curious:&lt;/P&gt;&lt;P&gt;Do you use this kind of expressions to compare a user selection (of 4 products) to total numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you tell us a bit more about your business requirement, I think someone here in the forum might be able to answer your performance question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 14:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290934#M1194126</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T14:34:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290935#M1194127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey swuehl-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your help, that being said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Product.ProdName={'$(&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;vProd1&lt;/STRONG&gt;&lt;/SPAN&gt;)'}&amp;gt;} Product.ProdValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vProd1 is actually a variable.&amp;nbsp; I have an input selector where the user defines the value of the field.&amp;nbsp; So, using your example that you presented... how would one adjust the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 14:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290935#M1194127</guid>
      <dc:creator />
      <dc:date>2011-07-19T14:44:25Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290936#M1194129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should look like&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;Product.ProdName = {"*$(vProd1)*"} &amp;gt;} Product.ProdValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I understand your question correctly (I was aware of vProd1 being a variabel, I assumed that you use a literal for the total match like 'ProdA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Variable vProd1 is defined as&lt;/P&gt;&lt;P&gt;='ProdA'&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 15:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290936#M1194129</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T15:18:37Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290937#M1194130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I'm not giving enough info. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vProd1 variable actually is a drop down selector.&amp;nbsp; The Product Names (which appears in the drop down selector) are already defined in a table.&amp;nbsp; Within the Product Name itself contains either "ProdA" or "ProdB."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So essentially, it goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. User has a drop down input selector.&amp;nbsp; He/she chooses a Product: ShoesProdA. &lt;/P&gt;&lt;P&gt;2. ShoesProdA appears in the straight table with a value of 4. Essential vProd1 (the variable) gets replaced with ShoesProdA, with a value of 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user has up to 30 products that they can select (in my example, I only went up to 4 hence: vProd1, vProd2....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that clears things up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 15:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290937#M1194130</guid>
      <dc:creator />
      <dc:date>2011-07-19T15:26:12Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290938#M1194132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With all the variables around, I think I missed the bottom line &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We started with a need for an expression for total column, summing up all ProdValues for ProdNames containing a certain search string, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you could do that with either using a literal or variable. &lt;/P&gt;&lt;P&gt;Do we still have a problem at this place?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand "Essential vProd1 (the variable) gets replaced with ShoesProdA, with a value of 4."&lt;/P&gt;&lt;P&gt;Does that mean you rename the variable to its value (Variablename vProd1 gets ShoesProdA and new value is numerical value of 4)? If so, what's that for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still got problems and in case it is feasible for you, please post a small sample file, I am really curious now...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 15:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290938#M1194132</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T15:40:03Z</dc:date>
    </item>
    <item>
      <title>Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290939#M1194133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"We started with a need for an expression for total column"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've already done this with the expression I originally posted. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"summing up all ProdValues for ProdNames containing a certain search string, right?"&lt;/P&gt;&lt;P&gt;Yes... this is *exactly* what I'm looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the Product Names, it contains either "ProdA" *or* "ProdB"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"I think that you could do that with either using a literal or variable.&lt;/P&gt;&lt;P&gt;Do we still have a problem at this place?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define the Products, I'm using a variable called vProd1, vProd2, vProd3, vProd4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These variables reference an input selector, when you click on the drop down (let's say for vProd1), a large dropdown list of Products appear. The user will select one of those products in the dropdown. Within the *name* of the Product in the dropdown that the user selects will contain either "ProdA" or "ProdB."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"I don't understand "Essential vProd1 (the variable) gets replaced with ShoesProdA, with a value of 4."&lt;/P&gt;&lt;P&gt;Does that mean you rename the variable to its value (Variablename vProd1 gets ShoesProdA and new value is numerical value of 4)? If so, what's that for?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, we don't rename anything, the user selects a Product from a dropdown list which is what defines the variable vProd1, vProd2, vProd3, or vProd4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290939#M1194133</guid>
      <dc:creator />
      <dc:date>2011-07-19T18:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290940#M1194134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's my sample QVW (and it's data) to help where I'm comin' from &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a "ProdA" Total column and a "ProdB" Total column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 18:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290940#M1194134</guid>
      <dc:creator />
      <dc:date>2011-07-19T18:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290941#M1194136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, now I think I get want you want...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...Something like attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not the most elegant way, but your task is really a bit tricky.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice evening,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 20:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290941#M1194136</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T20:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290942#M1194138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;me again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just checked, for total of the four selections,&lt;/P&gt;&lt;P&gt;you could also write expression like&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Product={'$(vProd1)'}+{'$(vProd2)'}+{'$(vProd3)'}+{'$(vProd4)'}&amp;gt;} ProductValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of the four sums (like you used in OP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, to filter only ProdA containing variables, you might use&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Product=({'$(vProd1)'}+{'$(vProd2)'}+{'$(vProd3)'}+{'$(vProd4)'})*{'*ProdA*'}&amp;gt;} ProductValue) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ProdB is trivial, of course)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 20:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290942#M1194138</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T20:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290943#M1194139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for all your help today. *Really* appreciate it. This definitely did it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 20:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290943#M1194139</guid>
      <dc:creator />
      <dc:date>2011-07-19T20:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Variables?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290944#M1194141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome. I am glad we got a good solution for an interesting problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good night,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 21:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Variables/m-p/290944#M1194141</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-07-19T21:46:55Z</dc:date>
    </item>
  </channel>
</rss>

