<?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: Interval table synthetic key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671118#M592869</link>
    <description>&lt;P&gt;Here is an example of how to tidy things up based on the example from the Qlik Sense online documentation (&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EventLog:
LOAD * Inline [
Time, Event, Comment
00:00, 0, Start of shift 1
01:18, 1, Line stop
02:23, 2, Line restart 50%
04:15, 3, Line speed 100%
08:00, 4, Start of shift 2
11:43, 5, End of production
];

OrderLog:
LOAD AutoNumber(Start &amp;amp; '|' &amp;amp; End) AS %StartEnd,* INLINE [
Start, End, Order
01:00, 03:35, A
02:30, 07:58, B
03:04, 10:27, C
07:23, 11:43, D
];

I_:
//LEFT JOIN , not wanted here so keep 
// the IntervalMatch table as tempory I_
IntervalMatch ( Time ) 
LOAD Start, End
RESIDENT OrderLog;

Order_Event:
LOAD Time,AutoNumber(Start&amp;amp;'|'&amp;amp;End) AS %StartEnd RESIDENT I_;

DROP TABLE I_;  // Not needed anymore since it was replaced 
                // by a composite key interval table in the last step&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way you have a single link table and you will keep the row count in each of the two original tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 03:58:06 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2020-01-31T03:58:06Z</dc:date>
    <item>
      <title>Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671114#M592866</link>
      <description>&lt;P&gt;Interval Table:&lt;/P&gt;&lt;P&gt;when implementing below interval match.. It forms many synthetic keys and really concerned in adding the code table fields to the Ca lender table. The data rows increases in calender table.. Is ther any other way ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is no direct link between the code table and calendar table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calendar_table:&lt;BR /&gt;LEFT KEEP (FACT) LOAD DATE_KEY As DT_KEY,&lt;BR /&gt;Date(CAL_DATE) As (calendar_date)&lt;BR /&gt;&lt;BR /&gt;FROM $(Path)DATES.qvd (qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code:&lt;BR /&gt;LEFT KEEP (FACT) LOAD CD,&lt;BR /&gt;Dept_CD,&lt;BR /&gt;Class,&lt;BR /&gt;startdate,&lt;BR /&gt;enddate&lt;BR /&gt;FROM $(Path)Dates.xls&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IntervalTable:&lt;BR /&gt;LEFT JOIN (code)&lt;BR /&gt;IntervalMatch(calendar_date)&lt;BR /&gt;LOAD startdate,enddate&lt;BR /&gt;RESIDENT code;&lt;/P&gt;&lt;P&gt;LEFT JOIN (calendar_table)&lt;BR /&gt;LOAD *&lt;BR /&gt;RESIDENT code;&lt;BR /&gt;DROP TABLE code;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671114#M592866</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2024-11-16T01:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671116#M592867</link>
      <description>&lt;P&gt;Be aware that an IntervalMatch() that does not have a JOIN prefix will generate a synthetic key as the way it should work. It is not a problem. It does look ugly and might be harder to understand but it works well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 03:52:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671116#M592867</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T03:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671117#M592868</link>
      <description>&lt;P&gt;So there is no other way to eliminate the sytnethic key or huge records after implementing interval match&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 03:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671117#M592868</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T03:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671118#M592869</link>
      <description>&lt;P&gt;Here is an example of how to tidy things up based on the example from the Qlik Sense online documentation (&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;EventLog:
LOAD * Inline [
Time, Event, Comment
00:00, 0, Start of shift 1
01:18, 1, Line stop
02:23, 2, Line restart 50%
04:15, 3, Line speed 100%
08:00, 4, Start of shift 2
11:43, 5, End of production
];

OrderLog:
LOAD AutoNumber(Start &amp;amp; '|' &amp;amp; End) AS %StartEnd,* INLINE [
Start, End, Order
01:00, 03:35, A
02:30, 07:58, B
03:04, 10:27, C
07:23, 11:43, D
];

I_:
//LEFT JOIN , not wanted here so keep 
// the IntervalMatch table as tempory I_
IntervalMatch ( Time ) 
LOAD Start, End
RESIDENT OrderLog;

Order_Event:
LOAD Time,AutoNumber(Start&amp;amp;'|'&amp;amp;End) AS %StartEnd RESIDENT I_;

DROP TABLE I_;  // Not needed anymore since it was replaced 
                // by a composite key interval table in the last step&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way you have a single link table and you will keep the row count in each of the two original tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 03:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671118#M592869</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T03:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671119#M592870</link>
      <description>&lt;P&gt;Yes - it is - I posted an example just a few seconds ago. And this should be performing well or at least much better than doing joins with huge tables.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 04:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671119#M592870</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T04:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671152#M592871</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Petter,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&lt;/P&gt;&lt;P&gt;will give a try and get back soon in case of any questions&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671152#M592871</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T07:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671161#M592872</link>
      <description>&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="book antiqua,palatino" color="#339966"&gt;&lt;SPAN&gt;&lt;EM&gt;Please click the &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;like&lt;/STRONG&gt;&lt;/FONT&gt; button or heck if the response was correct you could even mark it as a &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;correct solution&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;BR /&gt;Believe me - it will be greatly appriciated by the contributors ...&lt;BR /&gt;We &lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;love likes&lt;/FONT&gt;&lt;/STRONG&gt; as much as anyone posting anything on social media&lt;/EM&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671161#M592872</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T07:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671162#M592873</link>
      <description>&lt;P&gt;Hello Petter,&lt;/P&gt;&lt;P&gt;I just tired and interval match is working great with no synthetic key.However, it is creating a circular reference loop with the other tables. All&amp;nbsp; my tables with fact tables are now linked with dotted line link&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I just tired and interval match is working great with no syntetic key.However, it is creating a circular refrence loop with the other tables.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.png" style="width: 891px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27764i74AAF0984CD25FA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.png" alt="error.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671162#M592873</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T07:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671163#M592874</link>
      <description>&lt;P&gt;It is hard for me to suggest any way to resolve this without seeing a screenshot of the data model (Table Viewer) or getting a list of which tables and which fields that are involved in the circular references...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:48:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671163#M592874</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T07:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671166#M592875</link>
      <description>&lt;P&gt;Calendar_table:&lt;BR /&gt;LEFT KEEP (FACT) LOAD DATE_KEY As DT_KEY,&lt;BR /&gt;Date(CAL_DATE) As (calendar_date)&lt;BR /&gt;&lt;BR /&gt;FROM $(Path)DATES.qvd (qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code:&lt;BR /&gt;LEFT KEEP (FACT) LOAD&amp;nbsp; &amp;nbsp;AutoNumber(startdate&amp;amp; '|' &amp;amp; enddate) AS %StartEnd,&lt;/P&gt;&lt;P&gt;CD,&lt;BR /&gt;Dept_CD,&lt;BR /&gt;Class,&lt;BR /&gt;startdate,&lt;BR /&gt;enddate&lt;BR /&gt;FROM $(Path)Dates.xls&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IntervalTable:&lt;BR /&gt;IntervalMatch(calendar_date)&lt;BR /&gt;LOAD startdate,enddate&lt;BR /&gt;RESIDENT code;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New:&lt;/P&gt;&lt;P&gt;load&lt;BR /&gt;calendar_date,&lt;/P&gt;&lt;P&gt;AutoNumber(startdate&amp;amp; '|' &amp;amp; enddate) AS %StartEnd&lt;BR /&gt;Aresident IntervalTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DROP TABLE IntervalTable&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671166#M592875</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T07:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671167#M592876</link>
      <description>&lt;P&gt;Yes, i understand..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all my linking filed from fact tables are getting dotted lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 07:56:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671167#M592876</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T07:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671175#M592877</link>
      <description>&lt;P&gt;&amp;nbsp;excecuting this "A&lt;SPAN&gt;utoNumber(startdate&amp;amp; '|' &amp;amp; enddate) AS %StartEnd "&lt;/SPAN&gt; i am getting circular reference loop&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 08:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671175#M592877</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-01-31T08:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671177#M592878</link>
      <description>&lt;P&gt;Yes - you have already connected both the Code and the Calendar_table to the FACT table so connecting Code to Calendar_table with Interval_table will create a loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to remove either the Code to FACT connection or the Calendar_table to FACT connection to get rid of the circular reference.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 08:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671177#M592878</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-31T08:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671616#M592879</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;When i tried to remove the code connection from fact table, i am not getting the fields selected available in the codes table .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 04:22:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671616#M592879</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-02-03T04:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Interval table synthetic key</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671617#M592880</link>
      <description>&lt;P&gt;Should i pull all the fileds from the code table to the interval table ?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 04:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-table-synthetic-key/m-p/1671617#M592880</guid>
      <dc:creator>Prabhu1204</dc:creator>
      <dc:date>2020-02-03T04:24:13Z</dc:date>
    </item>
  </channel>
</rss>

