<?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 - combing both field and variable evaluations in the same query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304834#M112622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, your solution is perfect!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks for taking the time to review the attached,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2012 18:02:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-21T18:02:16Z</dc:date>
    <item>
      <title>Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304828#M112616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently have two set analysis expressions that are working well independantly of each other (one working of a value found in the data, the second working off variables).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to combine both evaluations within the same formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = { " =MktWidthBuyer&amp;lt;=MktWidthSeller " }&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = { ' &amp;lt;=$(varMktWidthMax)&amp;nbsp; &amp;gt;=$(varMktWidthMin) ' }&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thought I could just add the second expression as follows, but cannot get it to work correctly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = { " =MktWidthBuyer&amp;lt;=MktWidthSeller" '&amp;lt;=$(varMktWidthMax) &amp;gt;= $(varMktWidthMin)'&amp;nbsp; }&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts greatly appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 14:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304828#M112616</guid>
      <dc:creator />
      <dc:date>2012-02-21T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304829#M112617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=MktWidthSeller and MktWidthBuyer&amp;lt;=$(varMktWidthMax) and MktWidthBuyer&amp;gt;= $(varMktWidthMin)"}&amp;gt;} MktQtyKG)&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, 21 Feb 2012 16:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304829#M112617</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-21T16:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304830#M112618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your review, although at the moment it only returns a 0...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have attached a qv doc as an example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further thoughts, greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 17:09:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304830#M112618</guid>
      <dc:creator />
      <dc:date>2012-02-21T17:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304831#M112619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed that your one expression with the WidthSeller comparison actually is checking against max(MktWidthSeller).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I change the expression to&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=max(MktWidthSeller) and MktWidthBuyer&amp;lt;=$(varMktWidthMax) and MktWidthBuyer&amp;gt;= $(varMktWidthMin)"}&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do get results if the two variables are set. Are these input values optional or can be assume at least some absolute min / max limits (so we can create additional variables that check that at least these limits are set. Or use constraints to the Input variables).&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, 21 Feb 2012 17:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304831#M112619</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-21T17:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304832#M112620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, in fact it does work when both variables have been entered.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In reality, these variables are optional - should the user want to focus on a specific width etc...&amp;nbsp; and therefore can have 0,1,2 values (ie an upper value &amp;amp; no lower value etc...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you suggest to have&amp;nbsp; an if statement beforehand, working out which variables contain an input and then the relavant formula ie:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If len(varMktWidthMax)&amp;gt;0 and len(varMktWidthMin)&amp;gt;0, &lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=max(MktWidthSeller) and MktWidthBuyer&amp;lt;=$(varMktWidthMax) and MktWidthBuyer&amp;gt;= $(varMktWidthMin)"}&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(varMktWidthMax&amp;gt;0 and len(varMktWidthMin) = 0,&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=max(MktWidthSeller) and MktWidthBuyer&amp;lt;=$(varMktWidthMax) "}&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(varMktWidthMax=0 and len(varMktWidthMin)&amp;gt;0,&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=max(MktWidthSeller) and MktWidthBuyer&amp;gt;= $(varMktWidthMin)"}&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MktWidthBuyer = {"=MktWidthBuyer&amp;lt;=max(MktWidthSeller)"}&amp;gt;} MktQtyKG)&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a tidier way of doing the above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 17:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304832#M112620</guid>
      <dc:creator />
      <dc:date>2012-02-21T17:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304833#M112621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created two new variables that check if the input variables have been set and if not, use some exorbitantly large limits (you must know that these limits will never be reached by your values).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like this?&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, 21 Feb 2012 17:55:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304833#M112621</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-02-21T17:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - combing both field and variable evaluations in the same query</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304834#M112622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks, your solution is perfect!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks for taking the time to review the attached,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 18:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-combing-both-field-and-variable-evaluations-in-the/m-p/304834#M112622</guid>
      <dc:creator />
      <dc:date>2012-02-21T18:02:16Z</dc:date>
    </item>
  </channel>
</rss>

