<?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: Left Join + IntervalMatch causing count() to be incorrect? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113109#M7809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why rush to the removal of the intervalmatch() resulting table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know it's a synth key... but start by assessing the matching worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IntervalMatch("Timestamp")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Shifts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without any additionnal join. &lt;/P&gt;&lt;P&gt;(and if the results are wrong, begin checking formats and interpretation of timestamps)&lt;/P&gt;&lt;P&gt;(also are your shifts mutually exclusive / no overlapping? ) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2018 21:09:08 GMT</pubDate>
    <dc:creator>mikaelsc</dc:creator>
    <dc:date>2018-09-26T21:09:08Z</dc:date>
    <item>
      <title>Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113108#M7808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to associate a timestamp in one table with the shift date in another at the bottom of the code posted below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remove the underlined portion of the script(the portion that associates the two tables), I will get the correct count() when setting up my dimension on a bar graph but of course then the shift is no longer connected to the timestamp. The numbers are not even close it goes from a total of 10k for one error message to 7.2 million.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight into why this is happening, suggestions for alternative ways to do this, or critiques of other portions of the script would all be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[log]:&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Object,',',1) as Machine,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Object,',',2) as Order,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Key,',',1) as Product,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Key,' ',2) as Code,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Key,'-',2) as [Error Message],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Timestamp",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "UserID",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewValue As Comments;&lt;BR /&gt;SQL SELECT &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Timestamp",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "UserID",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewValue&lt;BR /&gt;FROM Plant.dbo.Log&lt;BR /&gt;WHERE Text LIKE 'O%';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Shifts]:&lt;BR /&gt;Load&lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replace(Replace(Replace(Replace(Replace([ShiftName],'A','1'),'B','2'),'C','3'),'D','4'),'E','5') as [Shift];&lt;BR /&gt;SQL Select &lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftName&lt;BR /&gt;FROM Plant.dbo.Info;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Temp:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Left Join (log)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;IntervalMatch("Timestamp")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Resident Shifts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Left Join (log)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Load *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Resident Shifts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Drop Table Shifts&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 20:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113108#M7808</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-26T20:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113109#M7809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why rush to the removal of the intervalmatch() resulting table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know it's a synth key... but start by assessing the matching worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IntervalMatch("Timestamp")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Shifts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without any additionnal join. &lt;/P&gt;&lt;P&gt;(and if the results are wrong, begin checking formats and interpretation of timestamps)&lt;/P&gt;&lt;P&gt;(also are your shifts mutually exclusive / no overlapping? ) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 21:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113109#M7809</guid>
      <dc:creator>mikaelsc</dc:creator>
      <dc:date>2018-09-26T21:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113110#M7810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition, what is the dimension and the field you are counting (with or without DISTINCT?)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked that the Timestamp is actually linked to incorrect shift time spans?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your shift table contains a lot of duplicates (for example, records per worker, but worker is not loaded), this also might explain an increased count().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 07:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113110#M7810</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-27T07:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113111#M7811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the input Mikael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've modified the last portion of the script to be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Shifts]:&lt;BR /&gt;Load&lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replace(Replace(Replace(Replace(Replace([ShiftName],'A','1'),'B','2'),'C','3'),'D','4'),'E','5') as [Shift];&lt;BR /&gt;SQL Select &lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftName&lt;BR /&gt;FROM Plant.dbo.info;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;IntervalMatch("Timestamp")&lt;BR /&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;BR /&gt;Resident Shifts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this is what you where suggesting to try. As you mentioned it did create a synthetic key, which from what I understand people usually try to avoid because of performance/memory issues?&lt;/P&gt;&lt;P&gt;The data manager and "load" function both completed in a short period of time so I don't have any concerns there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The modified script above accomplished exactly what I wanted, I have all the associations I need as well as the correct count. Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea why the original script was causing an issue using the count() function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113111#M7811</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T11:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113112#M7812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;Try&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;Temp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;inner Join (log)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;IntervalMatch("Timestamp")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; text-decoration: underline;"&gt;Resident Shifts;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113112#M7812</guid>
      <dc:creator>vvvvvvizard</dc:creator>
      <dc:date>2018-09-27T11:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113113#M7813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;In addition, what is the dimension and the field you are counting (with or without DISTINCT?)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Originally I was counting "text" but have tried other dimensions such as "code", and "machine".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Text" is a column filled with the same data in every row. My purpose of using Count() was to get the total of every occurrence but I did try Count(Distinct just to see the behavior and as expected it only count 1 instance per day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Have you checked that the Timestamp is actually linked to incorrect shift time spans?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The timestamp is linked to the correct shift spans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;If your shift table contains a lot of duplicates (for example, records per worker, but worker is not loaded), this also might explain an increased count().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Currently I'm loading ShiftplannedEnd, ShiftPlannedStart, and Shift.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ShiftPlannedEnd&amp;nbsp; or ShiftPlannedStart should not have any duplicates as it is the a combination of a date with a specific time&lt;/P&gt;&lt;P&gt;ShiftPlannedStart&lt;/P&gt;&lt;P&gt;1/1/2014 2:30PM&lt;/P&gt;&lt;P&gt;1/1/2014 10:30PM&lt;/P&gt;&lt;P&gt;1/2/2014 6:30AM&lt;/P&gt;&lt;P&gt;1/2/2014 2:30PM&lt;/P&gt;&lt;P&gt;ShiftPlannedEnd&lt;/P&gt;&lt;P&gt;1/1/2014 2:29:59PM&lt;/P&gt;&lt;P&gt;1/1/2014 10:29:59PM&lt;/P&gt;&lt;P&gt;1/2/2014 6:29:59AM&lt;/P&gt;&lt;P&gt;1/2/2014 2:29:59PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shift does contain a significant amount of duplicates as, depending on the ShiftPlannedStart it will be either a 1-5 for every entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your saying this could be the reason for the count() increase?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113113#M7813</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T11:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113114#M7814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you select a specific shift (Shift start and end timestamp), what does a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;ShiftPlannedStart)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;return?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113114#M7814</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-27T12:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113115#M7815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it definitely seems there are duplicates but I'm still unclear how and how this creates duplicates of other dimensions such as "text".&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="214592" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/214592_Capture.PNG" style="width: 620px; height: 209px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:10:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113115#M7815</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T12:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113116#M7816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't we expect a unique record per shift?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:13:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113116#M7816</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-27T12:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113117#M7817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I'm not sure where the duplication is coming from. With only the ShiftPlannedEnd highlighted here I would expect to see 8.11K instances of "9/27/2015 10:30:00 PM" but we only see one.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/214593_Capture1.PNG" style="width: 620px; height: 190px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113117#M7817</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T12:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113118#M7818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I haven't understood your last sample and where the log.ShiftPlannedStart is located vs ShiftPlannedStart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I see, the duplicates in your shift table will cause the incorrect count after Joining the tables (as long as you keep them unjoined, a count in the log table will be correct, no duplication of records due to the JOIN).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; Check your shifts table, consider using a DISTINCT LOAD of shifts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113118#M7818</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-27T12:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113119#M7819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I apologize for the confusion. My actual "log" table has a slight different name so I had modified the the KPI name to match our discussion. The correct way it would be displayed with my script in this post is Count(log.ShiftPlannedStart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So even if there are duplicates in a column the filter will only show one of those instances? I guess that does make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the concept behind using a distinct load but am unsure the extend of where I should use it. With my current understanding I've modified the script as follows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Shifts]:&lt;BR /&gt;&lt;STRONG&gt;Load Distinct&lt;/STRONG&gt; &lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replace(Replace(Replace(Replace(Replace([ShiftName],'A','1'),'B','2'),'C','3'),'D','4'),'E','5') as [Shift];&lt;BR /&gt;SQL Select &lt;BR /&gt; ShiftPlannedStart,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftPlannedEnd, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShiftName&lt;BR /&gt;FROM Plant.dbo.Info;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Left Join (log)&lt;BR /&gt;IntervalMatch("Timestamp")&lt;BR /&gt;Load ShiftPlannedStart, ShiftPlannedEnd&lt;BR /&gt;Resident Shifts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (log)&lt;BR /&gt;Load *&lt;BR /&gt;Resident Shifts;&lt;/P&gt;&lt;P&gt;Drop Table Shifts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this is what you intended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following modification has now given me the correct count when using the Dimension Log.Timestamp.Date and Measure Count(Text) on a bar graph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing I'm still unclear of is, why when counting log.ShiftPlannedStart do I get more than one instance?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/214608_Capture3.PNG" style="width: 620px; height: 211px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113119#M7819</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113120#M7820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is after joining the shifts to your log?&lt;/P&gt;&lt;P&gt;Now you've get a ShiftPlannedStart record for each timestamp, so I guess you have 16 log events in that shift?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, the filter pane does only show distinct values / symbols, not an entry per record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113120#M7820</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-09-27T14:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join + IntervalMatch causing count() to be incorrect?</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113121#M7821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I think I understand now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though I am doing a distinct load for "Shift" when I eventually join it with "log" it attaches a plannedshiftstart and plannedshiftend to every event that is applies to. which means the Count for plannedshiftstart should equal the number of events inside that range. I.E why the Count(log.PlannedShiftStart) equals 16 (the number of events during that time span)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe everything is working perfectly now, thank you for your help. I will mark your answer as correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 16:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-IntervalMatch-causing-count-to-be-incorrect/m-p/113121#M7821</guid>
      <dc:creator>t-gilchrist</dc:creator>
      <dc:date>2018-09-27T16:01:33Z</dc:date>
    </item>
  </channel>
</rss>

