<?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 based on another date in another table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1672569#M50905</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>Wed, 05 Feb 2020 14:34:30 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2020-02-05T14:34:30Z</dc:date>
    <item>
      <title>Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668735#M50493</link>
      <description>&lt;P&gt;Hi, I've come across a new one for me. In a simplified scenario I have three tables:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table1:
LOAD *,
NUM(MONTHSTART(Date)) AS Period.#key,
1 AS Amount;

LOAD * INLINE [
ID.#key,Date,User
1,01.01.2020,John
2,05.01.2020,Kenny
3,17.01.2020,Yuri
4,02.02.2020,Max
5,03.02.2020,John
6,04.02.2020,Kenny
7,06.02.2020,Michael
8,09.02.2020,Sandy
9,10.02.2020,Mike
10,17.02.2020,Kate
11,01.03.2020,Hope
12,05.03.2020,Chris
13,13.03.2020,Laura
14,15.03.2020,Lewis
15,19.03.2020,Otto
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table2:
LOAD *,
DATE(MONTHSTART(Date),'MM-YYYY') AS Period,
1 as Amount;

LOAD * INLINE [
ID.#key,Date,Type
1,04.01.2020,T
2,01.02.2020,R
3,29.01.2020,T
4,01.03.2020,R
5,07.02.2020,Z
6,05.02.2020,R
7,10.02.2020,T
8,14.02.2020,Z
9,01.03.2020,T
10,01.03.2020,Z
11,04.03.2020,R
12,15.03.2020,R
13,17.03.2020,T
14,24.03.2020,Z
15,30.03.2020,Z
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Calendar:
LOAD DISTINCT
[Period.#key],
YEAR([Period.#key]) AS Year,
MONTH([Period.#key]) AS Month,
DATE([Period.#key],'MM-YYYY') AS Period
RESIDENT Table1;&lt;/LI-CODE&gt;&lt;P&gt;And this is where I got stuck. I need to create a table that contains the period from calendar and two measures. One of them is Sum of Amount from Table 1, which isn't a problem at all. But I also need the Sum of Amount from Table 2, where period from Table2 matches the period of calendar (for example, in January of 2020, I'd expect to get 3 as the first measure and 2 as the second measure). I've tackled with P(), done all sorts of things, but just can't get it to work.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 08:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668735#M50493</guid>
      <dc:creator>RsQK</dc:creator>
      <dc:date>2020-01-24T08:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668748#M50494</link>
      <description>&lt;P&gt;Table1 and Table2 are Fact tables (that include measure data), so you should concatenate the two tables and give the Period field the same field name as in the MasterCalendar table. This way, all fact data is linked to the MasterCalendar data.&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 08:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668748#M50494</guid>
      <dc:creator>TimvB</dc:creator>
      <dc:date>2020-01-24T08:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668751#M50496</link>
      <description>&lt;P&gt;Thanks for the response, but concatenation isn't an option in this case.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 08:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668751#M50496</guid>
      <dc:creator>RsQK</dc:creator>
      <dc:date>2020-01-24T08:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668755#M50497</link>
      <description>&lt;P&gt;Maybe linking the fact tables as described here:&amp;nbsp;&lt;A href="http://www.learnallbi.com/link-table-in-qlikview/" target="_blank"&gt;http://www.learnallbi.com/link-table-in-qlikview/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 09:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668755#M50497</guid>
      <dc:creator>TimvB</dc:creator>
      <dc:date>2020-01-24T09:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668766#M50500</link>
      <description>&lt;P&gt;You could simply use this approach:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="courier new,courier" size="2"&gt;Table1:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD *,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;NUM(MonthStart(Date1)) AS Period.#key,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;1 AS Amount1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;​&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD * INLINE [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ID.#key1,Date1,User&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;1,01.01.2020,John&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;2,05.01.2020,Kenny&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;3,17.01.2020,Yuri&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;4,02.02.2020,Max&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;5,03.02.2020,John&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;6,04.02.2020,Kenny&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;7,06.02.2020,Michael&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;8,09.02.2020,Sandy&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;9,10.02.2020,Mike&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;10,17.02.2020,Kate&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;11,01.03.2020,Hope&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;12,05.03.2020,Chris&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;13,13.03.2020,Laura&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;14,15.03.2020,Lewis&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;15,19.03.2020,Otto&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;​&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Table2:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD *,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;NUM(MONTHSTART(Date2)) AS Period.#key,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;1 as Amount2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;​&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD * INLINE [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;ID.#key2,Date2,Type&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;1,04.01.2020,T&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;2,01.02.2020,R&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;3,29.01.2020,T&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;4,01.03.2020,R&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;5,07.02.2020,Z&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;6,05.02.2020,R&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;7,10.02.2020,T&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;8,14.02.2020,Z&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;9,01.03.2020,T&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;10,01.03.2020,Z&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;11,04.03.2020,R&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;12,15.03.2020,R&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;13,17.03.2020,T&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;14,24.03.2020,Z&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;15,30.03.2020,Z&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;​&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Calendar:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;[Period.#key],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;YEAR([Period.#key]) AS Year,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;MONTH([Period.#key]) AS Month,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;DATE([Period.#key],'MM-YYYY') AS Period&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;RESIDENT Table1;&lt;/FONT&gt;&lt;BR /&gt;​&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you wouldn't need to use Set Analysis at all - you just take advantage of the association between the three tables by period:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-01-24 QC #1.PNG" style="width: 661px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27384i55E3A8083C567A5D/image-dimensions/661x271?v=v2" width="661" height="271" role="button" title="2020-01-24 QC #1.PNG" alt="2020-01-24 QC #1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 09:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668766#M50500</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-24T09:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668775#M50502</link>
      <description>&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Linking the three tables on Period.#key will do the trick I believe (according to your stated requirements...), and you wouldn't need to use a Set Expression (aka. Set Analysis):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;LOAD *,&lt;BR /&gt;NUM(MonthStart(Date1)) AS Period.#key,&lt;BR /&gt;1 AS Amount1;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;ID.#key1,Date1,User&lt;BR /&gt;1,01.01.2020,John&lt;BR /&gt;2,05.01.2020,Kenny&lt;BR /&gt;3,17.01.2020,Yuri&lt;BR /&gt;4,02.02.2020,Max&lt;BR /&gt;5,03.02.2020,John&lt;BR /&gt;6,04.02.2020,Kenny&lt;BR /&gt;7,06.02.2020,Michael&lt;BR /&gt;8,09.02.2020,Sandy&lt;BR /&gt;9,10.02.2020,Mike&lt;BR /&gt;10,17.02.2020,Kate&lt;BR /&gt;11,01.03.2020,Hope&lt;BR /&gt;12,05.03.2020,Chris&lt;BR /&gt;13,13.03.2020,Laura&lt;BR /&gt;14,15.03.2020,Lewis&lt;BR /&gt;15,19.03.2020,Otto&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Table2:&lt;BR /&gt;LOAD *,&lt;BR /&gt;NUM(MONTHSTART(Date2)) AS Period.#key,&lt;BR /&gt;1 as Amount2;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;ID.#key2,Date2,Type&lt;BR /&gt;1,04.01.2020,T&lt;BR /&gt;2,01.02.2020,R&lt;BR /&gt;3,29.01.2020,T&lt;BR /&gt;4,01.03.2020,R&lt;BR /&gt;5,07.02.2020,Z&lt;BR /&gt;6,05.02.2020,R&lt;BR /&gt;7,10.02.2020,T&lt;BR /&gt;8,14.02.2020,Z&lt;BR /&gt;9,01.03.2020,T&lt;BR /&gt;10,01.03.2020,Z&lt;BR /&gt;11,04.03.2020,R&lt;BR /&gt;12,15.03.2020,R&lt;BR /&gt;13,17.03.2020,T&lt;BR /&gt;14,24.03.2020,Z&lt;BR /&gt;15,30.03.2020,Z&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LOAD&lt;BR /&gt;[Period.#key],&lt;BR /&gt;YEAR([Period.#key]) AS Year,&lt;BR /&gt;MONTH([Period.#key]) AS Month,&lt;BR /&gt;DATE([Period.#key],'MM-YYYY') AS Period&lt;BR /&gt;RESIDENT Table1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-01-24 QC #1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27387i73F8F76966CC9FCA/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-01-24 QC #1.PNG" alt="2020-01-24 QC #1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 09:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668775#M50502</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-24T09:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668782#M50503</link>
      <description>&lt;P&gt;Thanks for the response!&lt;/P&gt;&lt;P&gt;Actually T1 and T2 are linked through the ID.#key, so linking them just by the dates wouldn't suffice.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 09:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668782#M50503</guid>
      <dc:creator>RsQK</dc:creator>
      <dc:date>2020-01-24T09:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668818#M50507</link>
      <description>&lt;P&gt;Then you could simply keep the ID.#key common between Table1 and Table2. And you make the Period common between Table1 and Calendar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether you create a data model that connects the tables or do set expressions on-the-fly to connect the right values in various fields and tables or a combination and balance between the two depends on you total application and analysis need.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 10:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1668818#M50507</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-01-24T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis based on another date in another table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1672569#M50905</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>Wed, 05 Feb 2020 14:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-based-on-another-date-in-another-table/m-p/1672569#M50905</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2020-02-05T14:34:30Z</dc:date>
    </item>
  </channel>
</rss>

