<?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: How can I count the values in an interval dynamically? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798126#M64577</link>
    <description>&lt;P&gt;I send you a little example....&lt;/P&gt;</description>
    <pubDate>Thu, 08 Apr 2021 19:34:16 GMT</pubDate>
    <dc:creator>Christiann</dc:creator>
    <dc:date>2021-04-08T19:34:16Z</dc:date>
    <item>
      <title>How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1797880#M64529</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lot of values called CYCLETIME for serval ARTICLES and HOURS.&lt;/P&gt;&lt;P&gt;First the CYCLETIME should be separated in intervals with different &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;widths (0.01 / 0.02 / 0.05 / 0.1 and 0.2) and then the CYCLETIME should be added in the intervals. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I'm searching for the count of CYCLETIME&amp;nbsp; from the biggest interval (not the interval himself) in the different step widths maybe like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;ARTICLE&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE&amp;nbsp;&amp;nbsp; COUNT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 87&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.02&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 89&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 95&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 115&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 230&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I need this in a straight or pivot table because if I select different hours I have different results and I must calculated with this values.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Any good idea for me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Thanks for your effort!!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 08:04:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1797880#M64529</guid>
      <dc:creator>Christiann</dc:creator>
      <dc:date>2021-04-08T08:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1797969#M64545</link>
      <description>&lt;P&gt;Can you elaborate a little with some fake data as to what it is you are looking to see.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 12:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1797969#M64545</guid>
      <dc:creator>Dalton_Ruer</dc:creator>
      <dc:date>2021-04-08T12:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798000#M64553</link>
      <description>&lt;P&gt;Hi Dalton_Ruer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the following short script to generate fake data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; chr( 64 + ceil( rand() * 26 ) ) AS ARTICLE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ceil( rand() * 100 ) + rand() AS CYCLETIME&lt;/P&gt;&lt;P&gt;AUTOGENERATE( 1000 );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RANGE:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; RANGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 0.01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 0.02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 0.05&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 0.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 0.2 ] (delimiter is '|' );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm searching for is a pivot table with ARTICLE and RANGE as dimensions and a function like this:&lt;/P&gt;&lt;P&gt;count( aggr( mode( aggr( count( ceil( CYCLETIME, RANGE ) ), RANGE, ARTIKEL ) ), RANGE, ARTIKEL ) )&lt;/P&gt;&lt;P&gt;but this function doesn't work.&lt;/P&gt;&lt;P&gt;I hope this helps for understanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 13:20:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798000#M64553</guid>
      <dc:creator>Christiann</dc:creator>
      <dc:date>2021-04-08T13:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798082#M64570</link>
      <description>&lt;P&gt;When I run the script I get the following data model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are you hoping to see for the row with R where it's cycletime is 60.982xxxx?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CycleTime.png" style="width: 395px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/52679iC78AC2E41FDB069D/image-size/large?v=v2&amp;amp;px=999" role="button" title="CycleTime.png" alt="CycleTime.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 16:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798082#M64570</guid>
      <dc:creator>Dalton_Ruer</dc:creator>
      <dc:date>2021-04-08T16:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798107#M64575</link>
      <description>&lt;P&gt;This is correct.&lt;/P&gt;&lt;P&gt;Now you can create intervals in the 5 different steps size (the content from field RANGE) and order the CYCLETIME into these intervals. For your first line:&lt;/P&gt;&lt;P&gt;For the interval with step size 0.01 the value 60.98275 is in the interval 60.98 &amp;lt;= x &amp;lt; 60.99&lt;/P&gt;&lt;P&gt;for the next interval with step size 0.02 this value is in the interval 60.98 &amp;lt;= x &amp;lt; 61.00&lt;/P&gt;&lt;P&gt;with step size 0.05 the interval 60.95 &amp;lt;= x &amp;lt; 61.00 etc. etc. Every CYCLETIME must be sorted in an interval with every step size.&lt;/P&gt;&lt;P&gt;After this you must count the content from every interval step and find for every RANGE the interval with the most CYCLETIMEs.&lt;/P&gt;&lt;P&gt;You can use the class -function like&lt;/P&gt;&lt;P&gt;class( CYCLETIME, RANGE ) and in a pivot table with RANGE as dimension you have the result for every step size.&lt;/P&gt;&lt;P&gt;Because I don't need the interval with the most CYCLETIME but only the count of CYCLETIME in this interval I use the ceil - function for the upper fence from the interval (it's the same if you count the interval or the upper fence)&lt;/P&gt;&lt;P&gt;My function from top:&lt;/P&gt;&lt;P&gt;ceil( CYCLETIME, RANGE )&lt;/P&gt;&lt;P&gt;then I count the intervals&lt;/P&gt;&lt;P&gt;count( ceil( CYCLETIME, RANGE ) )&lt;/P&gt;&lt;P&gt;the mode - function deliver the max of count:&lt;/P&gt;&lt;P&gt;mode( count( ceil( CYCLETIME, RANGE ) ) ) but count in mode must be aggregated&lt;/P&gt;&lt;P&gt;mode( aggr( count( ceil( CYCLETIME, RANGE ) ), RANGE, ARTICLE ) )&lt;/P&gt;&lt;P&gt;This was my plan but doesn't work and now I'm searching a new idea...&lt;/P&gt;&lt;P&gt;The result should be like the table from top&lt;/P&gt;&lt;P&gt;first column the ARTICLE next the RANGE (for every ARTICLE) and then the max count from CYCLETIME for every step size of intervals.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 18:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798107#M64575</guid>
      <dc:creator>Christiann</dc:creator>
      <dc:date>2021-04-08T18:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I count the values in an interval dynamically?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798126#M64577</link>
      <description>&lt;P&gt;I send you a little example....&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 19:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-count-the-values-in-an-interval-dynamically/m-p/1798126#M64577</guid>
      <dc:creator>Christiann</dc:creator>
      <dc:date>2021-04-08T19:34:16Z</dc:date>
    </item>
  </channel>
</rss>

