<?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 How to find min and max value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1779910#M717644</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to find min and max value in entire data set.&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;Risk_Master:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;site_id as "Site ID",&lt;BR /&gt;site_id as "Site ID_Exists",&lt;BR /&gt;if(IsNull(mpl_total),'-',mpl_total) as "MPL total_1",&lt;BR /&gt;&lt;BR /&gt;'1' as flag_ID,&lt;BR /&gt;&lt;BR /&gt;(if(IsNull(mpl_total),'-',log(mpl_total+1)) - min(mpl_total))/(max(mpl_total)-min(mpl_total)*(5-1)+1) as "Maximum Potential Loss_1"&lt;/P&gt;&lt;P&gt;FROM [lib:/072020.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is report1596493779246)group by site_id,mpl_total;&lt;/P&gt;&lt;P&gt;But min max is working on low level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I need Min and max value of entire dataset.&lt;/P&gt;&lt;P&gt;For eample in the below Image "725016119" is the lowest vale which need toshow in all rows as min.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krish2459_0-1612376953207.png" style="width: 1005px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48424i0D2FAAA3864159D5/image-dimensions/1005x221?v=v2" width="1005" height="221" role="button" title="krish2459_0-1612376953207.png" alt="krish2459_0-1612376953207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 17:31:44 GMT</pubDate>
    <dc:creator>krish2459</dc:creator>
    <dc:date>2024-11-16T17:31:44Z</dc:date>
    <item>
      <title>How to find min and max value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1779910#M717644</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to find min and max value in entire data set.&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;Risk_Master:&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;BR /&gt;site_id as "Site ID",&lt;BR /&gt;site_id as "Site ID_Exists",&lt;BR /&gt;if(IsNull(mpl_total),'-',mpl_total) as "MPL total_1",&lt;BR /&gt;&lt;BR /&gt;'1' as flag_ID,&lt;BR /&gt;&lt;BR /&gt;(if(IsNull(mpl_total),'-',log(mpl_total+1)) - min(mpl_total))/(max(mpl_total)-min(mpl_total)*(5-1)+1) as "Maximum Potential Loss_1"&lt;/P&gt;&lt;P&gt;FROM [lib:/072020.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is report1596493779246)group by site_id,mpl_total;&lt;/P&gt;&lt;P&gt;But min max is working on low level.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I need Min and max value of entire dataset.&lt;/P&gt;&lt;P&gt;For eample in the below Image "725016119" is the lowest vale which need toshow in all rows as min.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krish2459_0-1612376953207.png" style="width: 1005px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/48424i0D2FAAA3864159D5/image-dimensions/1005x221?v=v2" width="1005" height="221" role="button" title="krish2459_0-1612376953207.png" alt="krish2459_0-1612376953207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:31:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1779910#M717644</guid>
      <dc:creator>krish2459</dc:creator>
      <dc:date>2024-11-16T17:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to find min and max value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1779926#M717645</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/75281"&gt;@krish2459&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can do the following, create 2 variables that contain the minimum the maximum of the data set, and then use these variables in your calculation in the following way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TEMP:
LOAD
MIN(mpl_total)	AS MIN,
MAX(mpl_total)	AS MAX
FROM [lib:/072020.xlsx]
(ooxml, embedded labels, table is report1596493779246);


LET vMaxValue=peek('MAX',0,'TEMP');
LET vMinValue=peek('MIN',0,'TEMP');

DROP TABLE TEMP;

Risk_Master:
LOAD
site_id as "Site ID",
site_id as "Site ID_Exists",
if(IsNull(mpl_total),'-',mpl_total) as "MPL total_1",
'1' as flag_ID,
(if(IsNull(mpl_total),'-',log(mpl_total+1)) - $(vMinValue))/($(vMaxValue)-$(vMinValue)*(5-1)+1) as "Maximum Potential Loss_1"
FROM [lib:/072020.xlsx]
(ooxml, embedded labels, table is report1596493779246)
group by site_id,mpl_total;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Joseph Morales&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 19:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1779926#M717645</guid>
      <dc:creator>JosephMorales</dc:creator>
      <dc:date>2021-02-03T19:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find min and max value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1780610#M717646</link>
      <description>&lt;P&gt;Thanks Joseph. It woking.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 18:43:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-min-and-max-value/m-p/1780610#M717646</guid>
      <dc:creator>krish2459</dc:creator>
      <dc:date>2021-02-05T18:43:39Z</dc:date>
    </item>
  </channel>
</rss>

