<?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 Conditional Format with Hrank - Dynamic Range in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447809#M35246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on building a P&amp;amp;L pivot table for multiple locations (the reason I am using Hrank). However, I am using slicers, so the maximum ranking is constantly changing based on my selections. For simplicity, lets assume that my selection gives me 8 locations. I am trying to highlight the top 3 a color and the bottom 3 a color, but am having a difficult time with creating a dynamic rank for the end ranking (i.e &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this equation works:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) -&amp;nbsp; sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) - sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &lt;SPAN style="background: yellow;"&gt;&amp;gt;5&lt;/SPAN&gt;, LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But this equation does not:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) -&amp;nbsp; sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) - sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &lt;SPAN style="background: yellow;"&gt;&amp;gt;(Count($(dim_StoreNumber)) - 3)&lt;/SPAN&gt;, LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have tested the (Count($(dim_StoreNumber)) - 3) = 5 by plugging the information into a simple KPI. However, when I use it as a range, the equation highlights all of the values above the top 3. Can you provide explanation as to why the second equation does not work and how to correct it?&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Sep 2017 21:01:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-09-06T21:01:37Z</dc:date>
    <item>
      <title>Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447809#M35246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on building a P&amp;amp;L pivot table for multiple locations (the reason I am using Hrank). However, I am using slicers, so the maximum ranking is constantly changing based on my selections. For simplicity, lets assume that my selection gives me 8 locations. I am trying to highlight the top 3 a color and the bottom 3 a color, but am having a difficult time with creating a dynamic rank for the end ranking (i.e &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this equation works:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) -&amp;nbsp; sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) - sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &lt;SPAN style="background: yellow;"&gt;&amp;gt;5&lt;/SPAN&gt;, LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But this equation does not:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) -&amp;nbsp; sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) - sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &lt;SPAN style="background: yellow;"&gt;&amp;gt;(Count($(dim_StoreNumber)) - 3)&lt;/SPAN&gt;, LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have tested the (Count($(dim_StoreNumber)) - 3) = 5 by plugging the information into a simple KPI. However, when I use it as a range, the equation highlights all of the values above the top 3. Can you provide explanation as to why the second equation does not work and how to correct it?&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 21:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447809#M35246</guid>
      <dc:creator />
      <dc:date>2017-09-06T21:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447810#M35247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #575757; font-family: arial, helvetica, sans-serif;"&gt;If(HRank(TOTAL (Sum(MS_FGS_Sales_Labor) -&amp;nbsp; Sum(MS_FGS_COGS_Labor)) / Sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #575757; font-family: arial, helvetica, sans-serif;"&gt;If(HRank(TOTAL (Sum(MS_FGS_Sales_Labor) - Sum(MS_FGS_COGS_Labor)) / Sum(MS_FGS_Sales_Labor)) &amp;gt;(Count(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; $(dim_StoreNumber)) - 3), LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 01:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447810#M35247</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-07T01:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447811#M35248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that erased the top 3 highlights and did not highlight anything red (all background colors remain unchanged).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 11:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447811#M35248</guid>
      <dc:creator />
      <dc:date>2017-09-07T11:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447812#M35249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might have accidentally removed a parenthesis, can you try again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) -&amp;nbsp; sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &amp;lt;=3, RGB(102,178,255),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;If(HRank(total(sum(MS_FGS_Sales_Labor) - sum(MS_FGS_COGS_Labor)) / sum(MS_FGS_Sales_Labor)) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; background: yellow;"&gt;&amp;gt;(Count(TOTAL $(dim_StoreNumber)) - 3)&lt;/SPAN&gt;, LightRed(),))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 16:02:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447812#M35249</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-07T16:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447813#M35250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Can you explain the reasoning of having to add TOTAL vs just having the count there?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI this worked perfectly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 16:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447813#M35250</guid>
      <dc:creator />
      <dc:date>2017-09-07T16:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Format with Hrank - Dynamic Range</title>
      <link>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447814#M35251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From your response, it seemed that you had Location as your dimension and when you did just count(), you probably were getting 1 for each location.... by using Total, it showed 8 (sum of all location) across all location on the chart.... So 1-3 = -2, but you needed 8-3 for this to work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2017 16:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Conditional-Format-with-Hrank-Dynamic-Range/m-p/1447814#M35251</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-07T16:21:04Z</dc:date>
    </item>
  </channel>
</rss>

