<?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: Finding Top 5 values in 10 columns in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519728#M106319</link>
    <description>&lt;P&gt;That works thank you so much for your help.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jun 2025 07:48:09 GMT</pubDate>
    <dc:creator>gurkan</dc:creator>
    <dc:date>2025-06-02T07:48:09Z</dc:date>
    <item>
      <title>Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519383#M106244</link>
      <description>&lt;P&gt;I have 10 columns containing number values and need to find and sum the top 5 values for each row. How can I do it in the data loading script?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 19:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519383#M106244</guid>
      <dc:creator>gurkan</dc:creator>
      <dc:date>2025-05-28T19:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519389#M106246</link>
      <description>&lt;P&gt;Without see-ing sample data, it will be hard to provide an appropriate answer.&lt;BR /&gt;Have you tried looking at the FirstSortedValue() Function?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/Scripting/AggregationFunctions/firstsorted.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/Scripting/AggregationFunctions/firstsorted.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 21:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519389#M106246</guid>
      <dc:creator>-SW-</dc:creator>
      <dc:date>2025-05-28T21:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519390#M106247</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I would maybe load this into a table using a crosstable function and resident load separately with a sort function. Then this can make the data dimensional and a measure with easy formulas. Like SW then mentioned use the firstsortedvalue() function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 21:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519390#M106247</guid>
      <dc:creator>seanbruton</dc:creator>
      <dc:date>2025-05-28T21:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519443#M106259</link>
      <description>&lt;P&gt;I want to give some examples below. I aim to find the top 5 values in the 10-column table and calculate the Sum of the Top 5 while loading the data. Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gurkan_1-1748506722022.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/180891i0D57C79E8229A965/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gurkan_1-1748506722022.png" alt="gurkan_1-1748506722022.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 08:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519443#M106259</guid>
      <dc:creator>gurkan</dc:creator>
      <dc:date>2025-05-29T08:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519499#M106272</link>
      <description>&lt;P&gt;If I was to assume that is your source table, you will need some sort of qualifier first.&lt;/P&gt;&lt;P&gt;Maybe use Rowno() as ID, then load the rest of your data in.&lt;/P&gt;&lt;P&gt;Then follow suit with SeanBruton response with cross table, and then do firstsortedvalue functions to pull what you need into a summarised table.&lt;/P&gt;&lt;P&gt;But tbh, you better off not using firstsortedvalue in the script and better off using the aggr() and Rank functions in the front end after doing cross table load. It be much more dynamic and usable dependent on selections etc&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 15:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519499#M106272</guid>
      <dc:creator>-SW-</dc:creator>
      <dc:date>2025-05-29T15:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519582#M106290</link>
      <description>&lt;P&gt;Thank you , I will try it.&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 08:27:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519582#M106290</guid>
      <dc:creator>gurkan</dc:creator>
      <dc:date>2025-05-30T08:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519639#M106301</link>
      <description>&lt;P&gt;Example solution:&lt;/P&gt;&lt;P&gt;Gurkan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the example. My apologies for the delay I was out of town.&lt;/P&gt;&lt;P&gt;My solution example below with script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="seanbruton_0-1748736251022.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/180925i6B4EFA6A72EC268E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="seanbruton_0-1748736251022.png" alt="seanbruton_0-1748736251022.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dataset_Org:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Table|Row|Col1|Col2|Col3|Col4|Col5|Col6|Col7|Col8|Col9|Col10&lt;BR /&gt;Tbl|R1|1|20|3|2|18|5|7|10|13|2&lt;BR /&gt;Tbl|R2|10|25|38|15|42|65|22|18|100|11&lt;BR /&gt;] (delimiter is '|');&lt;/P&gt;&lt;P&gt;Dataset_Cross_tmp:&lt;/P&gt;&lt;P&gt;CROSSTABLE (Col_Name,Col_Value,2)&lt;BR /&gt;LOAD * Resident Dataset_Org;&lt;/P&gt;&lt;P&gt;drop table Dataset_Org;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dataset_Cross_final:&lt;/P&gt;&lt;P&gt;LOAD *, IF(RANK &amp;lt;= 5, 1,0) AS Rank_ind;&lt;/P&gt;&lt;P&gt;LOAD *, AutoNumber(Col_Value,Row) as RANK&lt;BR /&gt;RESIDENT Dataset_Cross_tmp&lt;BR /&gt;ORDER BY Row,Col_Value DESC;&lt;/P&gt;&lt;P&gt;DROP TABLE Dataset_Cross_tmp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps. Please note I added Fields Table and Row as dimensional segmentation, You can use rowno function in place of Row Field. I have also attached the qvf file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2025 00:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519639#M106301</guid>
      <dc:creator>seanbruton</dc:creator>
      <dc:date>2025-06-01T00:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Top 5 values in 10 columns</title>
      <link>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519728#M106319</link>
      <description>&lt;P&gt;That works thank you so much for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 07:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Finding-Top-5-values-in-10-columns/m-p/2519728#M106319</guid>
      <dc:creator>gurkan</dc:creator>
      <dc:date>2025-06-02T07:48:09Z</dc:date>
    </item>
  </channel>
</rss>

