<?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 Help needed with ValueLoop example in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-needed-with-ValueLoop-example/m-p/7926#M618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm a Set Analysis rookie stuck on an example from the transportation industry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given a number of trips that have fields TRIP_ID, TRIP_START and TRIP_END where those are times but represented as an integer number of seconds, I'd like to create a chart that shows time as the dimension and the number of trips on the road as the measure.&amp;nbsp; I feel like the following expressions should do the trick but isn't working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&amp;nbsp; ValueLoop(0,86400)&amp;nbsp;&amp;nbsp; // 86400 is the number of seconds in a day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(A&lt;SPAN style="font-size: 10pt;"&gt;ggr(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;if(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TRIP_START &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ValueLoop&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(0,86400)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; and &lt;SPAN style="font-size: 13.3333px;"&gt;TRIP_END &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ValueLoop&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(0,86400)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, 1, 0), [TRIP_ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;From my research, it seems like Aggr and ValueLoop don't work well together, but I haven't been able to find an alternative.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jan 2018 19:20:16 GMT</pubDate>
    <dc:creator>dklassen</dc:creator>
    <dc:date>2018-01-26T19:20:16Z</dc:date>
    <item>
      <title>Help needed with ValueLoop example</title>
      <link>https://community.qlik.com/t5/App-Development/Help-needed-with-ValueLoop-example/m-p/7926#M618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm a Set Analysis rookie stuck on an example from the transportation industry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given a number of trips that have fields TRIP_ID, TRIP_START and TRIP_END where those are times but represented as an integer number of seconds, I'd like to create a chart that shows time as the dimension and the number of trips on the road as the measure.&amp;nbsp; I feel like the following expressions should do the trick but isn't working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&amp;nbsp; ValueLoop(0,86400)&amp;nbsp;&amp;nbsp; // 86400 is the number of seconds in a day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(A&lt;SPAN style="font-size: 10pt;"&gt;ggr(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;if(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TRIP_START &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ValueLoop&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(0,86400)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; and &lt;SPAN style="font-size: 13.3333px;"&gt;TRIP_END &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ValueLoop&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(0,86400)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, 1, 0), [TRIP_ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;From my research, it seems like Aggr and ValueLoop don't work well together, but I haven't been able to find an alternative.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:20:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-needed-with-ValueLoop-example/m-p/7926#M618</guid>
      <dc:creator>dklassen</dc:creator>
      <dc:date>2018-01-26T19:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with ValueLoop example</title>
      <link>https://community.qlik.com/t5/App-Development/Help-needed-with-ValueLoop-example/m-p/7927#M619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest to use an &lt;A href="https://community.qlik.com/qlik-blogpost/3037"&gt;IntervalMatch&lt;/A&gt; to match your start/end to a master-calendar and master-timetable &lt;A href="https://community.qlik.com/docs/DOC-8843"&gt;How to use - Master-Calendar and Date-Values&lt;/A&gt;‌. This meant to build a more suitable datamodel where your TRIP_ID is connected to them and to the rest of your datamodel. After this a count(TRIP_ID) should be enough to get your wanted results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2018 15:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-needed-with-ValueLoop-example/m-p/7927#M619</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-01-27T15:48:10Z</dc:date>
    </item>
  </channel>
</rss>

