<?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 Syntax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421804#M1150132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables from our contact management system, CATable (Calendar), and OMTable (Opportunity).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to select the first pending activity after today that has been entered by the Sales Rep who is assigned to the account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.User_ID=OMTable.Sales_Rep,CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but even though it said "Expression OK", I don't get any results. When I break it down into two expressions (i.e. two columns):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; works just fine, but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.User_ID=OMTable.Sales_Rep&amp;gt;} CATable.OnDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I just get nulls. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I was following the sample syntax scrupulously. Can I not compare two items from two different tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 20:20:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-02T20:20:09Z</dc:date>
    <item>
      <title>Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421804#M1150132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables from our contact management system, CATable (Calendar), and OMTable (Opportunity).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to select the first pending activity after today that has been entered by the Sales Rep who is assigned to the account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.User_ID=OMTable.Sales_Rep,CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but even though it said "Expression OK", I don't get any results. When I break it down into two expressions (i.e. two columns):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; works just fine, but&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;CATable.User_ID=OMTable.Sales_Rep&amp;gt;} CATable.OnDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I just get nulls. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I was following the sample syntax scrupulously. Can I not compare two items from two different tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421804#M1150132</guid>
      <dc:creator />
      <dc:date>2013-05-02T20:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421805#M1150133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression &lt;STRONG&gt;CATable.User_ID=OMTable.Sales_Rep&lt;/STRONG&gt; in the set analysis is incorrect.&lt;/P&gt;&lt;P&gt;Should be &lt;STRONG&gt;CATable.User_ID={&amp;lt;some value&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You state that &lt;EM&gt;min({&amp;lt;CATable.PorH=&lt;STRONG&gt;{'Pending'}&lt;/STRONG&gt;&amp;gt;}, CATable.OnDate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; works just fine&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;as it should be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421805#M1150133</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2013-05-02T20:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421806#M1150134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;"The expression &lt;STRONG&gt;CATable.User_ID=OMTable.Sales_Rep&lt;/STRONG&gt; in the set analysis is incorrect.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Should be &lt;STRONG&gt;CATable.User_ID={&amp;lt;some value&amp;gt;}"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;er&lt;/STRONG&gt;, the example given in the text is &amp;lt;OrderDate=DeliveryDate&amp;gt;, which certainly looks to me like it's two fields being compared to each other. However, those fields might be from the same table. So my question remains: can you compare two fields from different tables to each other in set analysis?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 12:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421806#M1150134</guid>
      <dc:creator />
      <dc:date>2013-05-03T12:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421807#M1150135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;min({$&amp;lt;CATable.User_ID=P(OMTable.Sales_Rep),CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 05:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421807#M1150135</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-06T05:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421808#M1150136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, mohit, but I don't see how that helps; I don't want to restrict the choice to ANY Sales Rep. I want it restricted to the Sales_Rep who is assigned to the account. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely there has to be a simple way to get the answer to this question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What was the last result when the assigned Sale Rep contacted the customer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried any number of things:&lt;/P&gt;&lt;P&gt;if(CA.User_ID=OM.Sales_Rep,firstsortedvalue(CA.ResultCode,-CA.FullTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsortedvalue(${&amp;lt;CA.User_ID={OM.Sales_Rep{&amp;gt;} CA.ResultCode,-CA.FullTime)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but nothing works! Please, there must be an answer somewhere...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 20:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421808#M1150136</guid>
      <dc:creator />
      <dc:date>2013-05-07T20:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421809#M1150137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, I believe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=min({&amp;lt;CATable.User_ID=OMTable.Sales_Rep,CATable.PorH={'Pending'}&amp;gt;}, CATable.OnDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is valid syntax. If you check the Help, you'll find that you can either use an element list, an element function or a field name to the right of the equal sign in a set modifier field selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would avoid to call this a comparison. I think it's better called a value assignment in a field selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help you with your expression, I am missing some information on your data model and the context you are using the expression in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post some more details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just assuming you are using the set expression in a table chart, maybe with Account as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, set analysis is evaluated per chart, not per dimension value, so Sales_Rep probably won't show an unambiguous value when evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 21:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421809#M1150137</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-07T21:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Syntax</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421810#M1150138</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;"In general, set analysis is evaluated per chart, not per dimension value, so Sales_Rep probably won't show an unambiguous value when evaluated."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, that might explain the situation - I was looking for something that was evaluated per dimension of "Company". I tried using "aggr" in a variety of ways without success, so I thought maybe set analysis would help, but based on what you said above, it's not going to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have thought that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=aggr(min(if(CATable.User_ID=OMTable.Sales_Rep AND CATable.PorH='Pending, CATable.OnDate)),Company)&amp;nbsp; would do the job, but it doesn't work either. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Syntax/m-p/421810#M1150138</guid>
      <dc:creator />
      <dc:date>2013-05-09T13:20:58Z</dc:date>
    </item>
  </channel>
</rss>

