<?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 - Max period by customer nr. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681853#M247207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it was a typo, sry:&lt;/P&gt;&lt;P&gt;but my selection will be like that: ValidTo &amp;gt;= 01.01.2002, ValidTo &amp;lt;= 15.06.2014,&lt;/P&gt;&lt;P&gt;as result i will get all 3 records and i want to have the max from, to from the three records depending on the customer nr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Jun 2014 15:58:40 GMT</pubDate>
    <dc:creator>pamaxeed</dc:creator>
    <dc:date>2014-06-15T15:58:40Z</dc:date>
    <item>
      <title>Set analysis - Max period by customer nr.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681850#M247204</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 have a question regarding set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following source table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 325px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="15" width="65"&gt;Customnr.&lt;/TD&gt;&lt;TD width="65"&gt;Country&lt;/TD&gt;&lt;TD width="65"&gt;Domizil&lt;/TD&gt;&lt;TD width="65"&gt;ValidFrom&lt;/TD&gt;&lt;TD width="65"&gt;ValidTo&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="15"&gt;1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;UK&lt;/TD&gt;&lt;TD&gt;01.01.2002&lt;/TD&gt;&lt;TD&gt;01.01.2003&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="15"&gt;1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;02.01.2003&lt;/TD&gt;&lt;TD&gt;31.12.2010&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="15"&gt;1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;01.01.2011&lt;/TD&gt;&lt;TD&gt;15.06.2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to build chart with the following condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my document i have a FROM and TO filter represented as calendar boxes. The FROM and TO are holding a variable, which triggers an action (Field selection) when they are get selected:&amp;nbsp; FROM &amp;lt;= ValidFrom and TO &amp;gt;= ValidTo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my chart i want to have the following result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets suppose that my FROM and TO filter has the following values: FROM=01.01.2002 and TO=15.06.2014.&lt;/P&gt;&lt;P&gt;What i expect as result in my chart is the following: the MAX period (ValidFrom and ValidTo) grouped by Customernr. in this case the result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Record number 3:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 325px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" height="15"&gt;1&lt;/TD&gt;&lt;TD&gt;CH&lt;/TD&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;01.01.2011&lt;/TD&gt;&lt;TD&gt;15.06.2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important condition my set analysis should be grouped by Customernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How i can achieve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Patric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 14:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681850#M247204</guid>
      <dc:creator>pamaxeed</dc:creator>
      <dc:date>2014-06-15T14:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Max period by customer nr.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681851#M247205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, your set analysis is calculated once per chart, not per dimension value (if that's what you intended).&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-1335"&gt;Evaluating "sets" in the context of a dimension&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I haven't fully understood your sample. FROM=01.01.2002 and TO=15.06.2004.&lt;/P&gt;&lt;P&gt;Your requested result is record 3, but it's ValidTo 15.05.2014 does not fulfill your condition TO &amp;gt;= ValidTo, right?&lt;/P&gt;&lt;P&gt;I think only record 1 fulfills your FROM &amp;lt;= ValidFron and TO &amp;gt;= ValidTo condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your sample has a typo and you mean TO=15.05.2014, wouldn't record 2 be the one with the max period then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 15:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681851#M247205</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-06-15T15:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Max period by customer nr.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681852#M247206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood you correctly you don't need set analysis. Create a straight table with Customernr. as dimension and four expressions:&lt;/P&gt;&lt;P&gt;firstsortedvalue(Country, -ValidTo)&lt;/P&gt;&lt;P&gt;firstsortedvalue(Domizil, -ValidTo)&lt;/P&gt;&lt;P&gt;firstsortedvalue(ValidFrom, -ValidTo)&lt;/P&gt;&lt;P&gt;max(ValidTo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And change the Select in Field triggers so you select FROM &amp;gt;= ValidFrom and TO&amp;lt;=ValidTo. Otherwise the only records that can match your selections are those where FROM = TO = ValidFrom = ValidTo, i.e they're all the same date..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 15:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681852#M247206</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-06-15T15:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Max period by customer nr.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681853#M247207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it was a typo, sry:&lt;/P&gt;&lt;P&gt;but my selection will be like that: ValidTo &amp;gt;= 01.01.2002, ValidTo &amp;lt;= 15.06.2014,&lt;/P&gt;&lt;P&gt;as result i will get all 3 records and i want to have the max from, to from the three records depending on the customer nr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 15:58:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681853#M247207</guid>
      <dc:creator>pamaxeed</dc:creator>
      <dc:date>2014-06-15T15:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis - Max period by customer nr.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681854#M247208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it works, attached the file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 16:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Max-period-by-customer-nr/m-p/681854#M247208</guid>
      <dc:creator>pamaxeed</dc:creator>
      <dc:date>2014-06-15T16:31:16Z</dc:date>
    </item>
  </channel>
</rss>

