<?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 Show the Max Rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780263#M455113</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;Could you please help me with this QlikView requirement? Below is a sample dataset:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to show the first Timestamp, where the CPU &amp;gt; 90%.&lt;/LI&gt;&lt;LI&gt;It should also show the Duration in Seconds till when it remained above 90% .&lt;/LI&gt;&lt;LI&gt;When the CPU goes below 90, another Row will be displayed the next time CPU again goes above 90%.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Sample Dataset and Expected Outcome is provided below:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Sample Dataset:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Tab:&lt;BR /&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt; * Inline&lt;BR /&gt;[&lt;BR /&gt;Time , CPU&lt;BR /&gt;12:00:01, 70%&lt;BR /&gt;12:00:02, 92%&lt;BR /&gt;12:00:03, 93%&lt;BR /&gt;12:00:04, 91%&lt;BR /&gt;12:00:05, 54%&lt;BR /&gt;12:00:06, 86%&lt;BR /&gt;12:00:07, 97%&lt;BR /&gt;12:00:08, 95%&lt;BR /&gt;12:00:09, 67%&lt;BR /&gt;12:00:10, 99%&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Expected Outcome:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Time&lt;/TD&gt;&lt;TD&gt;CPU&lt;/TD&gt;&lt;TD&gt;Duration stayed above 90%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:02&lt;/TD&gt;&lt;TD&gt;92%&lt;/TD&gt;&lt;TD&gt;3 secs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:07&lt;/TD&gt;&lt;TD&gt;97%&lt;/TD&gt;&lt;TD&gt;2 secs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:10&lt;/TD&gt;&lt;TD&gt;99%&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Feb 2021 16:30:23 GMT</pubDate>
    <dc:creator>dmohanty</dc:creator>
    <dc:date>2021-02-04T16:30:23Z</dc:date>
    <item>
      <title>Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780263#M455113</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;Could you please help me with this QlikView requirement? Below is a sample dataset:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to show the first Timestamp, where the CPU &amp;gt; 90%.&lt;/LI&gt;&lt;LI&gt;It should also show the Duration in Seconds till when it remained above 90% .&lt;/LI&gt;&lt;LI&gt;When the CPU goes below 90, another Row will be displayed the next time CPU again goes above 90%.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Sample Dataset and Expected Outcome is provided below:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Sample Dataset:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Tab:&lt;BR /&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt; * Inline&lt;BR /&gt;[&lt;BR /&gt;Time , CPU&lt;BR /&gt;12:00:01, 70%&lt;BR /&gt;12:00:02, 92%&lt;BR /&gt;12:00:03, 93%&lt;BR /&gt;12:00:04, 91%&lt;BR /&gt;12:00:05, 54%&lt;BR /&gt;12:00:06, 86%&lt;BR /&gt;12:00:07, 97%&lt;BR /&gt;12:00:08, 95%&lt;BR /&gt;12:00:09, 67%&lt;BR /&gt;12:00:10, 99%&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Expected Outcome:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Time&lt;/TD&gt;&lt;TD&gt;CPU&lt;/TD&gt;&lt;TD&gt;Duration stayed above 90%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:02&lt;/TD&gt;&lt;TD&gt;92%&lt;/TD&gt;&lt;TD&gt;3 secs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:07&lt;/TD&gt;&lt;TD&gt;97%&lt;/TD&gt;&lt;TD&gt;2 secs&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12:00:10&lt;/TD&gt;&lt;TD&gt;99%&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 16:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780263#M455113</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2021-02-04T16:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780458#M455123</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28804"&gt;@dmohanty&lt;/a&gt;&amp;nbsp; in load Script ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780458#M455123</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-05T09:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780460#M455124</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp; - Either Load Script or Set Analysis (Chart Level)&amp;nbsp; is fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Preferably at Chart level (with Set Analysis or Formula), as the data set is already loaded into model through Load Script.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:13:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780460#M455124</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2021-02-05T09:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780721#M641745</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any possible suggestions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 13:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780721#M641745</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2021-02-07T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780808#M1006639</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28804"&gt;@dmohanty&lt;/a&gt;&amp;nbsp; for load you can use for example :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Tab:


load *,if(peek(CPU)&amp;lt;0.9 and CPU&amp;gt;=0.9,1,0) as PickTmp
,if(peek(CPU)&amp;lt;0.9 and CPU&amp;gt;=0.9,1,if(peek(CPU)&amp;gt;=0.9 and CPU&amp;gt;=0.9,peek(Val)+1))  as Val,
if(rowno()=1,0,if(peek(CPU)&amp;lt;0.9 and CPU&amp;gt;=0.9,peek(ValGlobal),if(peek(CPU)&amp;gt;=0.9 and CPU&amp;gt;=0.9,peek(ValGlobal),peek(ValGlobal)+1)))  as ValGlobal;
Load Time , num(CPU) as CPU Inline
[
Time , CPU
12:00:01, 70%
12:00:02, 92%
12:00:03, 93%
12:00:04, 91%
12:00:05, 54%
12:00:06, 86%
12:00:07, 97%
12:00:08, 95%
12:00:09, 67%
12:00:10, 99%
];
left join load ValGlobal,Max(Val) as [Duration stayed above 90%] resident Tab group by ValGlobal;

output:

load Time ,CPU,if([Duration stayed above 90%]=1,'',[Duration stayed above 90%]&amp;amp;' secs') as [Duration stayed above 90%] resident Tab where PickTmp=1;

drop table Tab;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Taoufiq_Zarra_0-1612777974666.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48647i17E5DA5BB1F37AE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Taoufiq_Zarra_0-1612777974666.png" alt="Taoufiq_Zarra_0-1612777974666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 09:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780808#M1006639</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2021-02-08T09:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780958#M1189822</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp;,,&lt;/P&gt;&lt;P&gt;Thank you and appreciate your response here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will give this a try, will understand and revert on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a good time. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 17:07:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1780958#M1189822</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2021-02-08T17:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Show the Max Rows</title>
      <link>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1796856#M1211341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for the ideas and help. This suggestion is working fine for me. Accepted it as a solution. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 11:36:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-the-Max-Rows/m-p/1796856#M1211341</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2021-04-05T11:36:38Z</dc:date>
    </item>
  </channel>
</rss>

