<?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 How to make the right data connections? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-make-the-right-data-connections/m-p/263999#M1205682</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;I am somewhat puzzled by the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine an excel sheet with in&lt;BR /&gt;column1: customerID&lt;BR /&gt;column2: contractID&lt;BR /&gt;column3: acceptance date of contract&lt;/P&gt;&lt;P&gt;A customer is linked to more than 1 contract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this data (which is part of the whole sheet) I am creating a line chart, which:&lt;BR /&gt;plots the first contract date (from any 1 customer) on the x-axis, to the average number of contracts per customer. So I need to count the distinct number of contracts per customer ID, and set it off against the grouped earliest (2002, 2003, 2004 etcetera) contract dates. My problem is that I do not know how to find the first contract date per customer and use that in the dimension label, I suppose I should take action on the during load...? Is my problem clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts would be great!&lt;/P&gt;&lt;P&gt;Regards&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>Tue, 29 Jun 2010 13:57:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-29T13:57:57Z</dc:date>
    <item>
      <title>How to make the right data connections?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-the-right-data-connections/m-p/263999#M1205682</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;I am somewhat puzzled by the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine an excel sheet with in&lt;BR /&gt;column1: customerID&lt;BR /&gt;column2: contractID&lt;BR /&gt;column3: acceptance date of contract&lt;/P&gt;&lt;P&gt;A customer is linked to more than 1 contract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this data (which is part of the whole sheet) I am creating a line chart, which:&lt;BR /&gt;plots the first contract date (from any 1 customer) on the x-axis, to the average number of contracts per customer. So I need to count the distinct number of contracts per customer ID, and set it off against the grouped earliest (2002, 2003, 2004 etcetera) contract dates. My problem is that I do not know how to find the first contract date per customer and use that in the dimension label, I suppose I should take action on the during load...? Is my problem clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts would be great!&lt;/P&gt;&lt;P&gt;Regards&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>Tue, 29 Jun 2010 13:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-the-right-data-connections/m-p/263999#M1205682</guid>
      <dc:creator />
      <dc:date>2010-06-29T13:57:57Z</dc:date>
    </item>
    <item>
      <title>How to make the right data connections?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-make-the-right-data-connections/m-p/264000#M1205683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, you kind of want Customer as a dimension, but mapped to the first contract date for the customer on the X axis?&lt;/P&gt;&lt;P&gt;I think maybe this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;dimension = aggr(dual(only(CustomerID),min("acceptance date of contract")),CustomerID)&lt;BR /&gt;expression = count(distinct contractID)&lt;/P&gt;&lt;P&gt;Probably need to make the X axis continuous as well. And yeah, if it DOES work, probably better to do most of the work during the script, and just use the new field as the dimension, something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN ([Contracts])&lt;BR /&gt;LOAD&lt;BR /&gt; customerID&lt;BR /&gt;,date(min("acceptance date of contract")) as FirstContractDate&lt;BR /&gt;RESIDENT [Contracts]&lt;BR /&gt;GROUP BY customerID&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN ([Contracts])&lt;BR /&gt;LOAD *&lt;BR /&gt;,dual(customerID,FirstContractDate) as CustomerAndFirstContractDate&lt;BR /&gt;RESIDENT [Contracts]&lt;BR /&gt;;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;dimension = CustomerAndFirstContractDate&lt;BR /&gt;expression = count(distinct contractID)&lt;/P&gt;&lt;P&gt;But I may have misunderstood completely. (Or may have understood, and have posted a totally unworkable solution.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:31:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-make-the-right-data-connections/m-p/264000#M1205683</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-06-30T01:31:09Z</dc:date>
    </item>
  </channel>
</rss>

