<?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: Working with Lookup and Summary tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2505868#M104052</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/254087"&gt;@Lena4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did this work for you?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regards Jandre&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2025 05:47:34 GMT</pubDate>
    <dc:creator>JandreKillianRIC</dc:creator>
    <dc:date>2025-02-14T05:47:34Z</dc:date>
    <item>
      <title>Working with Lookup and Summary tables</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504853#M103852</link>
      <description>&lt;P&gt;Hi All - I'm hoping you can help me out figure out how to accomplish this. I've tried several things, but I'm missing something. I have two tables. One has timestamps, IDs, Values and locations.&amp;nbsp; &amp;nbsp;I want to look at each time/location and determine if the ID combinations in table2 are present.&amp;nbsp; The only thing in common between the two is the location.&lt;/P&gt;
&lt;P&gt;In the example below, IDs&amp;nbsp; 1&amp;amp;2 are 'active', so I look at table 2 and determine that corresponds with sublocation 'Area1A"&lt;/P&gt;
&lt;P&gt;In the future, I'll need to add a lot more Locations &amp;amp; Sub-locations, so I'm hoping for a solution that keeps that in mind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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="Lena4_0-1738862883269.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177295i915E9B47695F0608/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lena4_0-1738862883269.png" alt="Lena4_0-1738862883269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 17:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504853#M103852</guid>
      <dc:creator>Lena4</dc:creator>
      <dc:date>2025-02-06T17:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Lookup and Summary tables</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504916#M103868</link>
      <description>&lt;P&gt;Just making the lookup against the location isn't enough else you need to include more information like the ID. You may reach this by loading Table 2 with a crosstable-statement to push all ID information into a single field and then you will be able to combine the location and the ID within the lookup-value.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 07:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504916#M103868</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-07T07:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Lookup and Summary tables</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504934#M103870</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/254087"&gt;@Lena4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I built this out can could see that we need something like a line reference as the result table doesn't work doing a lookup. I also noticed that all the ID's need to match (But on a line Level) Here is my result table (And your 2)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JandreKillianRIC_0-1738919753222.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177316iC4DE085378440A7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JandreKillianRIC_0-1738919753222.png" alt="JandreKillianRIC_0-1738919753222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my Script&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table1Tmp:
Load 
	Timestamp(Timestamp) as Timestamp,
    ID, 
    Value, 
    Location; 
Load * Inline [
Timestamp,ID,Value,Location
45658.5,1,Active,A
45658.5416666667,2,Active,A
45658.5416666667,3,Active,A
45658.5416666667,6,Active,B
45658.625,1,Active,A
45658.625,2,Active,A
45658.75,5,Active,A
45658.75,3,Active,A
45658.8333333333,1,Active,B
45658.8333333333,2,Active,B
45658.8333333333,4,Active,B
];

Table1:
Load 
	Timestamp,
    Location,
    Concat(DISTINCT ID, '|') as IDs
Resident Table1Tmp
Where Len(Trim(ID))
Group By 
	Timestamp,
    Location;

Drop Table Table1Tmp; 

Table2Tmp:
Load 
	RowNo() as RowID,
	*;
Load * Inline [
Location,Sub-Location,ID1,ID2,ID3
A,Area1A,5,3,2
A,Area1A,2,3,
A,Area1A,5,3,
A,Area2A,2,4,
A,Area2A,1,2,
B,Area1B,1,2,4
B,Area1B,6,,
B,Area2B,,,
];



Table2Tmp2:
CrossTable(IDVal,ID, 3)
Load 
	*
Resident Table2Tmp;

Drop Field IDVal from Table2Tmp2;

Drop Table Table2Tmp; 

Table2:
Load 
	[Sub-Location],
    Location,
    RowID,
    Concat(DISTINCT ID, '|') as IDs
Resident Table2Tmp2
Where Len(Trim(ID))
Group By 
	[Sub-Location],
    Location,
    RowID;

Drop Table Table2Tmp2; 
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note this has a Syn Key (But you can remove that and just make a composite key using the Location and IDs field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the table &amp;gt; Dimension = Timestamp and the Measures&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sub Location A =&amp;nbsp;MaxString(IF(Right([Sub-Location],1) = 'A', [Sub-Location]))&lt;BR /&gt;Sub Location B =&amp;nbsp;MaxString(IF(Right([Sub-Location],1) = 'B', [Sub-Location]))&lt;BR /&gt;&lt;BR /&gt;Regards Jandre&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 09:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2504934#M103870</guid>
      <dc:creator>JandreKillianRIC</dc:creator>
      <dc:date>2025-02-07T09:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Lookup and Summary tables</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2505838#M104050</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/174995"&gt;@JandreKillianRIC&lt;/a&gt;&amp;nbsp;Thanks for breaking this down!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ae_app" data-nosnippet=""&gt;&lt;!--
        Layout, Style or Voice Helpers
    --&gt;
&lt;DIV id="ae_helpers" class="ae-module" style="display: none;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;!--
        Compliance
    --&gt;
&lt;DIV id="ae_compliance" class="ae-module" style="display: none;"&gt;&lt;!-- For autoSmartRem addNewWindowWarnings div is referenced in an aria-describedby --&gt;
&lt;DIV id="audioeye_new_window_message" style="display: none;"&gt;Opens in new window&lt;/DIV&gt;
&lt;DIV id="audioeye_pdf_message" style="display: none;"&gt;PDF Download&lt;/DIV&gt;
&lt;DIV id="audioeye_word_message" style="display: none;"&gt;Word Download&lt;/DIV&gt;
&lt;DIV id="audioeye_excel_message" style="display: none;"&gt;Excel Download&lt;/DIV&gt;
&lt;DIV id="audioeye_powerpoint_message" style="display: none;"&gt;PowerPoint Download&lt;/DIV&gt;
&lt;DIV id="audioeye_document_message" style="display: none;"&gt;Document Download&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;!--
        Versioning Control Panel if versioning = true !
    --&gt; &lt;!--
        Launcher
    --&gt;  &lt;!-- Toolbar --&gt;  &lt;!--
        Site Menu
    --&gt;  &lt;!--
        Generic Aria Live message container
    --&gt;
&lt;DIV id="ae_enabled_messages" class="ae-blurb-noaudio" aria-relevant="additions" aria-live="assertive"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;!-- Symbol definitions --&gt;    &lt;/DIV&gt;
&lt;!-- end #ae_app --&gt;</description>
      <pubDate>Thu, 13 Feb 2025 23:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2505838#M104050</guid>
      <dc:creator>Lena4</dc:creator>
      <dc:date>2025-02-13T23:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Working with Lookup and Summary tables</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2505868#M104052</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/254087"&gt;@Lena4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did this work for you?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regards Jandre&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 05:47:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-Lookup-and-Summary-tables/m-p/2505868#M104052</guid>
      <dc:creator>JandreKillianRIC</dc:creator>
      <dc:date>2025-02-14T05:47:34Z</dc:date>
    </item>
  </channel>
</rss>

