<?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 Ranking in order of priority in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961750#M79279</link>
    <description>&lt;P&gt;Dear Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a "Planning" column which is causing duplicates, I need to prioritize the contents of this column which contains A , B and C such that A is stronger then B then C.&lt;/P&gt;
&lt;P&gt;For exemple : if Planning contains A, B and C, then&amp;nbsp;Planning take A , if B and C then Planning must take B...&lt;/P&gt;
&lt;P&gt;I tried this but it didn't work :&lt;/P&gt;
&lt;P&gt;if ( match(Planning,'A') and match ( Planning,'B'),'A',&lt;BR /&gt;if ( match(Planning,'A') and match ( Planning,'C'),'A',&lt;BR /&gt;if ( match(Planning,'B') and match ( Planning,'C'),'B'))) as Plan&lt;/P&gt;
&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 12:37:42 GMT</pubDate>
    <dc:creator>MattMika</dc:creator>
    <dc:date>2022-07-28T12:37:42Z</dc:date>
    <item>
      <title>Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961750#M79279</link>
      <description>&lt;P&gt;Dear Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a "Planning" column which is causing duplicates, I need to prioritize the contents of this column which contains A , B and C such that A is stronger then B then C.&lt;/P&gt;
&lt;P&gt;For exemple : if Planning contains A, B and C, then&amp;nbsp;Planning take A , if B and C then Planning must take B...&lt;/P&gt;
&lt;P&gt;I tried this but it didn't work :&lt;/P&gt;
&lt;P&gt;if ( match(Planning,'A') and match ( Planning,'B'),'A',&lt;BR /&gt;if ( match(Planning,'A') and match ( Planning,'C'),'A',&lt;BR /&gt;if ( match(Planning,'B') and match ( Planning,'C'),'B'))) as Plan&lt;/P&gt;
&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 12:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961750#M79279</guid>
      <dc:creator>MattMika</dc:creator>
      <dc:date>2022-07-28T12:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961782#M79288</link>
      <description>&lt;P&gt;Hi MattMika,&lt;/P&gt;
&lt;P&gt;for this logic, you can simply use&lt;/P&gt;
&lt;P&gt;If(Match(Planning, 'A') &amp;gt; 0, 'A', If(Match(Planning, 'B') &amp;gt; 0, 'B', 'C')) as Plan&lt;/P&gt;
&lt;P&gt;Let me know if it helped&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Can&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 13:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961782#M79288</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2022-07-28T13:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961826#M79298</link>
      <description>&lt;P&gt;This couldn't work because it's evaluated on the record-level and here has Planning always a single value. This means you will need to aggregate the multiple Planning status-information against the needed dimensionality.&lt;/P&gt;
&lt;P&gt;It might be done with concat() which returned a concatenated string which might be checked with match/wildmatch() within if-loops but easier could be just to use maxstring() or by using of appropriate dual() values for Planning min/max() or even sum() to get the wanted information. This may look like:&lt;/P&gt;
&lt;P&gt;t: load AnyKey, maxstring(Planning) as MaxPlanning&lt;BR /&gt;from Source group by AnyKey;&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 14:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1961826#M79298</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-07-28T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962175#M79324</link>
      <description>&lt;P&gt;Hi Canerkan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It didn't work, this solution delete only the duplicate rows&amp;nbsp; while i need to take only one value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 08:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962175#M79324</guid>
      <dc:creator>MattMika</dc:creator>
      <dc:date>2022-07-29T08:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962259#M79328</link>
      <description>&lt;P&gt;Hi MattMika,&lt;/P&gt;
&lt;P&gt;do you have any sample data you can provide by chance?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 10:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962259#M79328</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2022-07-29T10:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962455#M79336</link>
      <description>&lt;P&gt;what single value of "Planning" would you expect to match 'A' and 'B' at the same time?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 19:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962455#M79336</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-07-29T19:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962760#M79371</link>
      <description>&lt;P&gt;Hi Canerkan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is an example of existing data and the result wanted!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:07:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962760#M79371</guid>
      <dc:creator>MattMika</dc:creator>
      <dc:date>2022-08-01T09:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962761#M79372</link>
      <description>&lt;P&gt;Hi Marco,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached an example that better expresses my need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962761#M79372</guid>
      <dc:creator>MattMika</dc:creator>
      <dc:date>2022-08-01T09:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962772#M79375</link>
      <description>&lt;P&gt;The results from your example are looking different to the described aim from above - in not getting the highest/latest status else the last/first one.&lt;/P&gt;
&lt;P&gt;In this case you may use interrecord-functions like peek() or previous() within a properly sorted resident-load with an if-loop querying if the current record is a new one compared to the key-fields from the above record or not.&lt;/P&gt;
&lt;P&gt;Beside this you could use an aggregation-load like above mentioned with first/last() or firstsortedvalue() as aggregation-function - just try it within a new app and your sample-data and if it worked like expected you transfer it into your origin app.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962772#M79375</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-08-01T09:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962782#M79376</link>
      <description>&lt;P&gt;Hi MattMika,&lt;/P&gt;
&lt;P&gt;maybe try the following script. In this Script the Rank goes from A2, A1, A3:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table:
LOAD
	[Item],
	[Store],
    Planning,
    Dual(Planning, If(Planning = 'A2', 1, If(Planning = 'A1', 2, 3))) as RankPlanning
 FROM [lib://Downloads/Sample.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Feuil1);


Final:
Load
	Item,
    Store,
    Min(RankPlanning) as RankPlanning
Resident Table
Group by Item, Store;

Drop Table Table;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if it helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Can&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 09:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962782#M79376</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2022-08-01T09:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in order of priority</title>
      <link>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962838#M79383</link>
      <description>&lt;P&gt;It worked as expected, Thank you for your help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 11:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ranking-in-order-of-priority/m-p/1962838#M79383</guid>
      <dc:creator>MattMika</dc:creator>
      <dc:date>2022-08-01T11:38:56Z</dc:date>
    </item>
  </channel>
</rss>

