<?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: Struggling to Rank by a KPI for a specific Date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506349#M104170</link>
    <description>&lt;P&gt;What is your KPI? If "Safety" is a field, the KPI could be e.g. Max(Safety) or Avg(Safety).&lt;/P&gt;
&lt;P&gt;Is "CalendarDate" a date or a month? If both "CalendarDate" and "vPreviousMonth" represent the first date of the month, then your Set expression could work, but if it is a date, you need to tweak the Set expression and perhaps use &lt;BR /&gt;CalendarDate={"&amp;gt;=$(vPreviousMonth)"}.&lt;/P&gt;
&lt;P&gt;What is your dimension in the chart? If it is "CM1CTCode", then a naked Aggr() could work, but if it isn't, then you need to wrap it in an aggregation function, e.g. Concat(Aggr(...),', ').&lt;/P&gt;
&lt;P&gt;So try something similar to&lt;BR /&gt;Concat(&lt;BR /&gt;&amp;nbsp; Aggr(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Rank(Max({&amp;lt;CalendarDate={"$(vPreviousMonth)"}&amp;gt;} Safety),4,1)&amp;lt;=3,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Max({&amp;lt;CalendarDate={"$(vPreviousMonth)"}&amp;gt;} Safety)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CM1CTCode&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ),&lt;BR /&gt;&amp;nbsp; ', '&lt;BR /&gt;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;See also&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/Pitfalls-of-the-Aggr-function/ba-p/1463275" target="_blank"&gt;https://community.qlik.com/t5/Design/Pitfalls-of-the-Aggr-function/ba-p/1463275&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.amazon.com/s?k=qlik+according+to+hic" target="_blank"&gt;https://www.amazon.com/s?k=qlik+according+to+hic&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 10:15:44 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2025-02-18T10:15:44Z</dc:date>
    <item>
      <title>Struggling to Rank by a KPI for a specific Date</title>
      <link>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506230#M104142</link>
      <description>&lt;P&gt;Hello, I have a safety KPI [Safety] which is ranked 0-1, and i am trying to make a table that in the dimension, returns the top 3 projects [CM1CTCODE]&amp;nbsp; with the highest safety score, this i know how to do, however i am having issues because i need it specifically to only count which projects were top 3, last month [CalendarDate]. I have tried the following codes but nothing seems to work:&lt;/P&gt;
&lt;P&gt;=if(AGGR(rank({&amp;lt;CalendarDate={'$(=$(vPreviousMonth))'}&amp;gt;}Safety,1,1),CM1CTCode)&amp;lt;=3,CM1CTCode,null()) // Returns too many entrys&lt;/P&gt;
&lt;P&gt;={&amp;lt;Safety={"=Rank({&amp;lt;CalendarDate={'$(=$(vPreviousMonth))'}&amp;gt;}Safety)&amp;lt;=3"}&amp;gt;}CM1CTCode // just kind of returns, whatever&lt;/P&gt;
&lt;P&gt;i have tried these both (and similar code) with different numbers in the Rank() function and nothing seems to work. I just need the dimension column to ONLY show any project with a Rank(Safety,1,1) of less than 3, so tied projects included&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 17:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506230#M104142</guid>
      <dc:creator>Tian-Jay</dc:creator>
      <dc:date>2025-02-17T17:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Struggling to Rank by a KPI for a specific Date</title>
      <link>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506349#M104170</link>
      <description>&lt;P&gt;What is your KPI? If "Safety" is a field, the KPI could be e.g. Max(Safety) or Avg(Safety).&lt;/P&gt;
&lt;P&gt;Is "CalendarDate" a date or a month? If both "CalendarDate" and "vPreviousMonth" represent the first date of the month, then your Set expression could work, but if it is a date, you need to tweak the Set expression and perhaps use &lt;BR /&gt;CalendarDate={"&amp;gt;=$(vPreviousMonth)"}.&lt;/P&gt;
&lt;P&gt;What is your dimension in the chart? If it is "CM1CTCode", then a naked Aggr() could work, but if it isn't, then you need to wrap it in an aggregation function, e.g. Concat(Aggr(...),', ').&lt;/P&gt;
&lt;P&gt;So try something similar to&lt;BR /&gt;Concat(&lt;BR /&gt;&amp;nbsp; Aggr(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Rank(Max({&amp;lt;CalendarDate={"$(vPreviousMonth)"}&amp;gt;} Safety),4,1)&amp;lt;=3,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Max({&amp;lt;CalendarDate={"$(vPreviousMonth)"}&amp;gt;} Safety)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CM1CTCode&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ),&lt;BR /&gt;&amp;nbsp; ', '&lt;BR /&gt;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;See also&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/Pitfalls-of-the-Aggr-function/ba-p/1463275" target="_blank"&gt;https://community.qlik.com/t5/Design/Pitfalls-of-the-Aggr-function/ba-p/1463275&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.amazon.com/s?k=qlik+according+to+hic" target="_blank"&gt;https://www.amazon.com/s?k=qlik+according+to+hic&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 10:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506349#M104170</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2025-02-18T10:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Struggling to Rank by a KPI for a specific Date</title>
      <link>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506382#M104178</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TianJay_0-1739885312310.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177665iEF393C459751964A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TianJay_0-1739885312310.png" alt="TianJay_0-1739885312310.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That hasnt worked, i need the output to be as similar as it can be to this example, this uses pivot tables but i need it to be the same output but instead of groups A and B it is the Different CalendarDates (Year Month info)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 13:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Struggling-to-Rank-by-a-KPI-for-a-specific-Date/m-p/2506382#M104178</guid>
      <dc:creator>Tian-Jay</dc:creator>
      <dc:date>2025-02-18T13:29:33Z</dc:date>
    </item>
  </channel>
</rss>

