<?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 Group By not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484092#M101114</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I wonder what am I doing wrong with this group by that’s currently not working on my app.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;map_1min_table_A: &lt;BR /&gt;LOAD &lt;BR /&gt;timestamp(Floor(DateTime,1/1440), 'YYYY-MM-DD hh:mm:ss') as DateTime_Map1, &lt;BR /&gt;VesselNo as VesselNo_Map1,&lt;BR /&gt;PropellerNo as PropellerNo_Map1,&lt;BR /&gt;maxstring(location) as location_Map1,&lt;BR /&gt;maxstring(peekLocation1min) as peeklocation_Map1&lt;BR /&gt;resident final_table&lt;BR /&gt;group by VesselNo, PropellerNo, DateTime&lt;BR /&gt;order by VesselNo, PropellerNo, DateTime;&lt;/P&gt;
&lt;P&gt;The objective for this is to have one line per minute, vessel and propeller with the current location and location from 1 minute ago (this information is already available on the resident final_table).&lt;BR /&gt;&lt;BR /&gt;Am I doing something wrong? The output of this generates more than 1 line per minute as you can see on the image attached.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Polido_0-1727450435390.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172272i2A065747D2B53134/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Polido_0-1727450435390.png" alt="Polido_0-1727450435390.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 15:24:08 GMT</pubDate>
    <dc:creator>Polido</dc:creator>
    <dc:date>2024-09-27T15:24:08Z</dc:date>
    <item>
      <title>Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484092#M101114</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I wonder what am I doing wrong with this group by that’s currently not working on my app.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;map_1min_table_A: &lt;BR /&gt;LOAD &lt;BR /&gt;timestamp(Floor(DateTime,1/1440), 'YYYY-MM-DD hh:mm:ss') as DateTime_Map1, &lt;BR /&gt;VesselNo as VesselNo_Map1,&lt;BR /&gt;PropellerNo as PropellerNo_Map1,&lt;BR /&gt;maxstring(location) as location_Map1,&lt;BR /&gt;maxstring(peekLocation1min) as peeklocation_Map1&lt;BR /&gt;resident final_table&lt;BR /&gt;group by VesselNo, PropellerNo, DateTime&lt;BR /&gt;order by VesselNo, PropellerNo, DateTime;&lt;/P&gt;
&lt;P&gt;The objective for this is to have one line per minute, vessel and propeller with the current location and location from 1 minute ago (this information is already available on the resident final_table).&lt;BR /&gt;&lt;BR /&gt;Am I doing something wrong? The output of this generates more than 1 line per minute as you can see on the image attached.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Polido_0-1727450435390.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172272i2A065747D2B53134/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Polido_0-1727450435390.png" alt="Polido_0-1727450435390.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484092#M101114</guid>
      <dc:creator>Polido</dc:creator>
      <dc:date>2024-09-27T15:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484097#M101115</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142948"&gt;@Polido&lt;/a&gt;&amp;nbsp; Once you do the group by , do you need&amp;nbsp;&lt;SPAN&gt;final_table? if not drop that table. If you need that table due to other fields then you need to perform inner join with group table like below. It will be joined on 5 highlighted fields. Make sure that field names are same in&amp;nbsp;final_table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;inner join (final_table)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD&lt;BR /&gt;timestamp(Floor(DateTime,1/1440), 'YYYY-MM-DD hh:mm:ss') as &lt;STRONG&gt;DateTime_Map1&lt;/STRONG&gt;,&lt;BR /&gt;VesselNo as &lt;STRONG&gt;VesselNo_Map1&lt;/STRONG&gt;,&lt;BR /&gt;PropellerNo as &lt;STRONG&gt;PropellerNo_Map1&lt;/STRONG&gt;,&lt;BR /&gt;maxstring(location) as &lt;STRONG&gt;location_Map1&lt;/STRONG&gt;,&lt;BR /&gt;maxstring(peekLocation1min) as &lt;STRONG&gt;peeklocation_Map1&lt;/STRONG&gt;&lt;BR /&gt;resident final_table&lt;BR /&gt;group by VesselNo, PropellerNo, DateTime&lt;BR /&gt;order by VesselNo, PropellerNo, DateTime;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:32:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484097#M101115</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-09-27T15:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484100#M101116</link>
      <description>&lt;P&gt;Thank you for the fast reply Kushal!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try this but I'm afraid I'll have peeklocation for every second if I join them together.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the final_table has everything I want for most of the app and has data for every second. My aim was to create a separate table with only location and peeklocation for every minute, so the end user could select which frequency of data to see on the map. See the movement of the vehicle every second or every minute. Depending on the quantity of days selected.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484100#M101116</guid>
      <dc:creator>Polido</dc:creator>
      <dc:date>2024-09-27T15:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484102#M101117</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/142948"&gt;@Polido&lt;/a&gt;&amp;nbsp; I don't see anything wrong in your group by. probably you can try with left join and create flag. Use that flag to filter your data in set analysis&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;left join (final_table)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD distinct&lt;BR /&gt;timestamp(Floor(DateTime,1/1440), 'YYYY-MM-DD hh:mm:ss') as&amp;nbsp;&lt;STRONG&gt;DateTime_Map1&lt;/STRONG&gt;,&lt;BR /&gt;VesselNo as&amp;nbsp;&lt;STRONG&gt;VesselNo_Map1&lt;/STRONG&gt;,&lt;BR /&gt;PropellerNo as&amp;nbsp;&lt;STRONG&gt;PropellerNo_Map1&lt;/STRONG&gt;,&lt;BR /&gt;maxstring(location) as&amp;nbsp;&lt;STRONG&gt;location_Map1&lt;/STRONG&gt;,&lt;BR /&gt;maxstring(peekLocation1min) as&amp;nbsp;&lt;STRONG&gt;peeklocation_Map1,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;1 as flag_check&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;resident final_table&lt;BR /&gt;group by VesselNo, PropellerNo, DateTime&lt;BR /&gt;order by VesselNo, PropellerNo, DateTime;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484102#M101117</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-09-27T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484139#M101122</link>
      <description>&lt;P&gt;It could be that you are grouping by&amp;nbsp;&lt;EM&gt;[DateTime]&amp;nbsp;&lt;/EM&gt;that is a timestamp on a more detailed level than minutes. [I assume this since you use&amp;nbsp;&lt;EM&gt;Floor(DateTime,1/1440)&amp;nbsp;&lt;/EM&gt;in the load statement.]&lt;/P&gt;
&lt;P&gt;To get one line per minute you also need to group by by the minute and not the original timestamp.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to precreate your minute level timestamp field before doing your aggregation, or modify your "group by" to this: &lt;EM&gt;group by VesselNo, PropellerNo, Floor(DateTime,1/1440)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2024 05:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484139#M101122</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-09-28T05:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Group By not working</title>
      <link>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484425#M101153</link>
      <description>&lt;P&gt;Hi Vegar, thank you for your help!&lt;/P&gt;
&lt;P&gt;Yes, this does the trick I've managed to get this working by doing the following group by and came here to close the topic.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;group by VesselNo, PropellerNo, timestamp(Floor(DateTime,1/1440), 'YYYY-MM-DD hh:mm:ss')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for Kushal as well, could be a good workaround.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 16:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Group-By-not-working/m-p/2484425#M101153</guid>
      <dc:creator>Polido</dc:creator>
      <dc:date>2024-09-30T16:56:57Z</dc:date>
    </item>
  </channel>
</rss>

