<?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: Issue with comparing rows on different tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issue-with-comparing-rows-on-different-tables/m-p/1137769#M20084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small&lt;EM&gt;er&lt;/EM&gt; Qlik Sense app that illustrates the problem. Fake data is fine as long as it's representative of your real data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Aug 2016 15:03:13 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-08-20T15:03:13Z</dc:date>
    <item>
      <title>Issue with comparing rows on different tables</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-comparing-rows-on-different-tables/m-p/1137768#M20083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on some Set analysis to check performance of customers post-sale.&lt;/P&gt;&lt;P&gt;My data model includes a table for Sale (and other) events, and a table for person check-ins. They are linked by a 'PERSON_ID' field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a measure to count the number of check-ins a person has on the first 21 days after a sale. I ended up with this set analisys statement:&lt;/P&gt;&lt;P&gt;count({&amp;lt;Person_DateTime = {"=CHECK_IN_DATE&amp;gt;=DATE and CHECK_IN_DATE&amp;lt;=DATE+21"}, EVENT_TYPE={'SALE'}, DATE = {"&amp;gt;$(vPreviousMonthEnd)"}&amp;gt;} distinct Person_DateTime)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date : Date field on my Events (Sales) table.&lt;/P&gt;&lt;P&gt;CHECK_IN_DATE : Date field on my checkins table.&lt;/P&gt;&lt;P&gt;Person_DateTime: Unique identifier of a checkin.&lt;/P&gt;&lt;P&gt;let vPreviousMonthEnd = '=MonthEnd(AddMonths(max(DATE),-1))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable vPreviousMonthEnd is used to only count the checkins of sales in MTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work fine when a person has had only a single sale. It properly counts the number of checkins in the first 21 days after the sale.&lt;/P&gt;&lt;P&gt;However, in cases where the person has had more than 1 sale, I'm getting no results, unless I limit the sales using a selection (E.g. on the DATE field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please explain this behavior?&lt;/P&gt;&lt;P&gt;How could I change my measure to work with persons with multiple sales?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Daniel Balchasan&#xD;
Added a QVF with test data and the measure I'm using,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 09:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-comparing-rows-on-different-tables/m-p/1137768#M20083</guid>
      <dc:creator />
      <dc:date>2016-08-19T09:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with comparing rows on different tables</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-with-comparing-rows-on-different-tables/m-p/1137769#M20084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post a small&lt;EM&gt;er&lt;/EM&gt; Qlik Sense app that illustrates the problem. Fake data is fine as long as it's representative of your real data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2016 15:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-with-comparing-rows-on-different-tables/m-p/1137769#M20084</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-20T15:03:13Z</dc:date>
    </item>
  </channel>
</rss>

