<?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: Using Min function in Set Analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725681#M1086213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that and although it did further filter my count of records meeting the criteria, upon a manual inspection of all customer records and their minimum start date within the data model, I find that there are more than is being returned by the above expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example I choose the currnet financial year as time period and the two variables will evaluate to varMinDate = 01/04/2014 and&amp;nbsp; varMaxDate = 31/03/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need out of all the customers contributing to service expenditure in this finacial year is a count of &lt;STRONG&gt;only those with their first service start date in this financial year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elliot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2014 08:27:26 GMT</pubDate>
    <dc:creator>lobmeister165</dc:creator>
    <dc:date>2014-06-23T08:27:26Z</dc:date>
    <item>
      <title>Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725679#M1086211</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 am trying to use &lt;STRONG&gt;indirect&lt;/STRONG&gt; &lt;STRONG&gt;set analysis&lt;/STRONG&gt; expressions to filter a count of records based on a minimum value and keep getting incorrect values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically, I need to count a number of customer who have a 'service start date' within the time period currently selected BUT ONLY where that start date is the first (Minimum) Start Date for each particular customer. Basically I need a count of customers where the service is their first to date within the currently selected time period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have tried the following expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using comma separation of expressions:&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;=$(varMinDate)&amp;lt;=$(varMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;E&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;lt;$(varMinDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;})&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..and the * operator for intersection:&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;=$(varMinDate)&amp;lt;=$(varMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt; * $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;E&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;lt;$(varMinDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;})&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;in this expression the variables I use evaluate the minimum (varMinDate) and maximum (varMaxDate) dates within the date range currently selected by the user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Please help, I have spent a lot of work time and internet research time trying to get this right without success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Many Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Elliot Kaye&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725679#M1086211</guid>
      <dc:creator>lobmeister165</dc:creator>
      <dc:date>2014-06-23T08:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725680#M1086212</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;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;=$(varMinDate)&amp;lt;=$(varMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;E&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;lt;$(varMinDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;}&lt;SPAN style="color: #ff00ff; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725680#M1086212</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-23T08:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725681#M1086213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that and although it did further filter my count of records meeting the criteria, upon a manual inspection of all customer records and their minimum start date within the data model, I find that there are more than is being returned by the above expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example I choose the currnet financial year as time period and the two variables will evaluate to varMinDate = 01/04/2014 and&amp;nbsp; varMaxDate = 31/03/2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need out of all the customers contributing to service expenditure in this finacial year is a count of &lt;STRONG&gt;only those with their first service start date in this financial year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elliot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725681#M1086213</guid>
      <dc:creator>lobmeister165</dc:creator>
      <dc:date>2014-06-23T08:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725682#M1086214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Elliot Kaye wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;of &lt;STRONG&gt;only those with their &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;first&lt;/EM&gt;&lt;/SPAN&gt; service start date in this financial year&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So, a customer would have multiple service start date, right? If so, do you have any flag to determine the first one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:40:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725682#M1086214</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-23T08:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725683#M1086215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes - a customer may have one or more service start dates.&lt;/P&gt;&lt;P&gt;There is no 'flag' in the data. Services are in one table and Customers in another, they are joined via a 'link table' via their respective ID fields - Service ID and Cust ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add a striaght table and use CustId as dimension and Min(Service Start Date) as expression, I get the correct, unique first date for each customer. This is what I am checking the count against&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 08:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725683#M1086215</guid>
      <dc:creator>lobmeister165</dc:creator>
      <dc:date>2014-06-23T08:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725684#M1086216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;=$(varMinDate)&amp;lt;=$(varMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;SPAN style="color: #ff00ff;"&gt;P&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({&lt;SPAN style="color: #ff00ff;"&gt;$&lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&lt;SPAN style="color: #ff00ff;"&gt;=&lt;/SPAN&gt;$(varMinDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;}&lt;SPAN style="color: #ff00ff; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 09:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725684#M1086216</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-23T09:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Min function in Set Analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725685#M1086217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not quite - but it led me to the correct expression so thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one does it :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;=$(varMinDate)&amp;lt;=$(varMaxDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;},&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Client ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;-=&lt;/STRONG&gt;P({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Service Start Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;$(varMinDate)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&lt;BR /&gt;&amp;gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[CustID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 09:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Min-function-in-Set-Analysis-expression/m-p/725685#M1086217</guid>
      <dc:creator>lobmeister165</dc:creator>
      <dc:date>2014-06-23T09:32:07Z</dc:date>
    </item>
  </channel>
</rss>

