<?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 Comparing 2 value lists to count duplicates (NOT using flag in Load Script): Booking status analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Comparing-2-value-lists-to-count-duplicates-NOT-using-flag-in/m-p/2054913#M86662</link>
    <description>&lt;P&gt;The app should compare a selected month’s future six months booking change. ( butI post a protoptye to simplerfy the issue)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I don’t want to create flags comparisons in load script,&lt;/STRONG&gt; because I have to create so many tables &lt;BR /&gt;(n!/(n-q)!*q! ) in load script,&amp;nbsp; and which wouldn’t be a good way for the continuing months' analysis. Eventually I want to use a filter pane to choose a month of data saved and created 15 comparisons are displayed.&lt;/P&gt;
&lt;P&gt;But BEFORE that, I created a prototype with sample data sets that are four data lists. Each is saved in Nov, Dec, Jan and Feb. &amp;nbsp;IDs for booking saved in November is ID11, and booking data saved in the end of Dev is ID12 so on and so forth.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nezuko_kamado_0-1680127470637.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103813iF0C0EDAD48A783D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="nezuko_kamado_0-1680127470637.png" alt="nezuko_kamado_0-1680127470637.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But first issue is, &lt;STRONG&gt;when checking the boxes of comparison of two months, the last rows bring wrong IDs&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if(ID11 = ID12,  aggr(concat(distinct ID12, ',') , StayMonth))&lt;/LI-CODE&gt;
&lt;P&gt;and for continued booking IDs in StayMonth of Feb should only have H, not I, J, K., because November doesn’t have I, J, K&lt;/P&gt;
&lt;P&gt;The same error shows over the other boxes except the last comparison box of Jan-Feb&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second issue is that the code&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if(ID11 = ID12,  count(distinct ID12)) &lt;/LI-CODE&gt;
&lt;P&gt;doesn’t count the number of distinct IDs that shared in two months. It should count the comparison of Nov and Dec as 2, because of E and F. Yet it shows 1.&lt;/P&gt;
&lt;P&gt;NovInput:&lt;BR /&gt;load * inline [ ID, ID11, StayNight, StayMonth&lt;BR /&gt;A, A, 3, Nov&lt;BR /&gt;B, B,4 , Nov&lt;BR /&gt;C, C,2, Dec&lt;BR /&gt;D, D, 4, Dec&lt;BR /&gt;E, E,2, Jan&lt;BR /&gt;F, F,3, Jan&lt;BR /&gt;G, G, 4, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;DecInput:&lt;BR /&gt;load * inline [ID, ID12, StayNight, StayMonth&lt;BR /&gt;C, C, 2, Dec &lt;BR /&gt;E, E, 2, Jan&lt;BR /&gt;F, F, 3, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;I, I, 4, Feb&lt;BR /&gt;J, J, 5, Feb&lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Janinput:&lt;BR /&gt;load * inline [ ID,ID1,StayNight, StayMonth&lt;BR /&gt;E, E, 2, Jan&lt;BR /&gt;F, F, 3, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;I, I, 4, Feb&lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar&lt;BR /&gt;M, M, 2, Mar&lt;BR /&gt;N, N, 3, Mar];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;FebInput:&lt;BR /&gt;load * inline [ID, ID2,StayNight, StayMonth&lt;BR /&gt;H, H, 2, Feb &lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar&lt;BR /&gt;N, N, 3, Mar];&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 22:14:06 GMT</pubDate>
    <dc:creator>nezuko_kamado</dc:creator>
    <dc:date>2023-03-29T22:14:06Z</dc:date>
    <item>
      <title>Comparing 2 value lists to count duplicates (NOT using flag in Load Script): Booking status analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Comparing-2-value-lists-to-count-duplicates-NOT-using-flag-in/m-p/2054913#M86662</link>
      <description>&lt;P&gt;The app should compare a selected month’s future six months booking change. ( butI post a protoptye to simplerfy the issue)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I don’t want to create flags comparisons in load script,&lt;/STRONG&gt; because I have to create so many tables &lt;BR /&gt;(n!/(n-q)!*q! ) in load script,&amp;nbsp; and which wouldn’t be a good way for the continuing months' analysis. Eventually I want to use a filter pane to choose a month of data saved and created 15 comparisons are displayed.&lt;/P&gt;
&lt;P&gt;But BEFORE that, I created a prototype with sample data sets that are four data lists. Each is saved in Nov, Dec, Jan and Feb. &amp;nbsp;IDs for booking saved in November is ID11, and booking data saved in the end of Dev is ID12 so on and so forth.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nezuko_kamado_0-1680127470637.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103813iF0C0EDAD48A783D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="nezuko_kamado_0-1680127470637.png" alt="nezuko_kamado_0-1680127470637.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But first issue is, &lt;STRONG&gt;when checking the boxes of comparison of two months, the last rows bring wrong IDs&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if(ID11 = ID12,  aggr(concat(distinct ID12, ',') , StayMonth))&lt;/LI-CODE&gt;
&lt;P&gt;and for continued booking IDs in StayMonth of Feb should only have H, not I, J, K., because November doesn’t have I, J, K&lt;/P&gt;
&lt;P&gt;The same error shows over the other boxes except the last comparison box of Jan-Feb&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second issue is that the code&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if(ID11 = ID12,  count(distinct ID12)) &lt;/LI-CODE&gt;
&lt;P&gt;doesn’t count the number of distinct IDs that shared in two months. It should count the comparison of Nov and Dec as 2, because of E and F. Yet it shows 1.&lt;/P&gt;
&lt;P&gt;NovInput:&lt;BR /&gt;load * inline [ ID, ID11, StayNight, StayMonth&lt;BR /&gt;A, A, 3, Nov&lt;BR /&gt;B, B,4 , Nov&lt;BR /&gt;C, C,2, Dec&lt;BR /&gt;D, D, 4, Dec&lt;BR /&gt;E, E,2, Jan&lt;BR /&gt;F, F,3, Jan&lt;BR /&gt;G, G, 4, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;DecInput:&lt;BR /&gt;load * inline [ID, ID12, StayNight, StayMonth&lt;BR /&gt;C, C, 2, Dec &lt;BR /&gt;E, E, 2, Jan&lt;BR /&gt;F, F, 3, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;I, I, 4, Feb&lt;BR /&gt;J, J, 5, Feb&lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Janinput:&lt;BR /&gt;load * inline [ ID,ID1,StayNight, StayMonth&lt;BR /&gt;E, E, 2, Jan&lt;BR /&gt;F, F, 3, Jan&lt;BR /&gt;H, H, 2, Feb&lt;BR /&gt;I, I, 4, Feb&lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar&lt;BR /&gt;M, M, 2, Mar&lt;BR /&gt;N, N, 3, Mar];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;FebInput:&lt;BR /&gt;load * inline [ID, ID2,StayNight, StayMonth&lt;BR /&gt;H, H, 2, Feb &lt;BR /&gt;K, K, 1, Feb&lt;BR /&gt;L, L, 3, Mar&lt;BR /&gt;N, N, 3, Mar];&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 22:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Comparing-2-value-lists-to-count-duplicates-NOT-using-flag-in/m-p/2054913#M86662</guid>
      <dc:creator>nezuko_kamado</dc:creator>
      <dc:date>2023-03-29T22:14:06Z</dc:date>
    </item>
  </channel>
</rss>

