<?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 Percentage Year on Year change in Insight Advisor</title>
    <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508025#M479</link>
    <description>&lt;P&gt;I am trying to adapt the following Qlik Sense expression which is supposed to calculate the percentage change for each value in the field 'Gender' (Female, Male, Prefer not to say) from the previous year (the year is in the field 'Year' and has the values 2020, 2021, 2022, 2023 and 2024 - I would like the percentage change in the year 2020 to be NA or a dash as this is the first year and does not have any years before it.&lt;BR /&gt;&lt;BR /&gt;At the moment the expression is giving the percentage change between the current row and the one above it and not giving any values for 'Females' at all (see attached picture of output). How do I need to adapt the expression so that it works correctly as shown in the final column? I have tried using AGGR with 'Year' and 'Gender' but cannot get it to work. Any help will be greatly appreciated:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;IF(&lt;BR /&gt;Count(DISTINCT UniqueID) &amp;gt;= 5 OR Count(DISTINCT UniqueID) = 0,&lt;BR /&gt;&lt;BR /&gt;IF(&lt;BR /&gt;Above(Count(DISTINCT UniqueID)) &amp;gt; 0,&lt;BR /&gt;Num(&lt;BR /&gt;(Count(DISTINCT UniqueID) - Above(Count(DISTINCT UniqueID))) /&lt;BR /&gt;Above(Count(DISTINCT UniqueID)),&lt;BR /&gt;'0.0%'&lt;BR /&gt;),&lt;BR /&gt;'N/A'&lt;BR /&gt;),&lt;/P&gt;
&lt;P&gt;'&amp;lt;5'&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tripod6999_0-1741004166375.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178055i8D945989583A527F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tripod6999_0-1741004166375.png" alt="tripod6999_0-1741004166375.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Mar 2025 12:16:32 GMT</pubDate>
    <dc:creator>tripod6999</dc:creator>
    <dc:date>2025-03-03T12:16:32Z</dc:date>
    <item>
      <title>Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508025#M479</link>
      <description>&lt;P&gt;I am trying to adapt the following Qlik Sense expression which is supposed to calculate the percentage change for each value in the field 'Gender' (Female, Male, Prefer not to say) from the previous year (the year is in the field 'Year' and has the values 2020, 2021, 2022, 2023 and 2024 - I would like the percentage change in the year 2020 to be NA or a dash as this is the first year and does not have any years before it.&lt;BR /&gt;&lt;BR /&gt;At the moment the expression is giving the percentage change between the current row and the one above it and not giving any values for 'Females' at all (see attached picture of output). How do I need to adapt the expression so that it works correctly as shown in the final column? I have tried using AGGR with 'Year' and 'Gender' but cannot get it to work. Any help will be greatly appreciated:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;IF(&lt;BR /&gt;Count(DISTINCT UniqueID) &amp;gt;= 5 OR Count(DISTINCT UniqueID) = 0,&lt;BR /&gt;&lt;BR /&gt;IF(&lt;BR /&gt;Above(Count(DISTINCT UniqueID)) &amp;gt; 0,&lt;BR /&gt;Num(&lt;BR /&gt;(Count(DISTINCT UniqueID) - Above(Count(DISTINCT UniqueID))) /&lt;BR /&gt;Above(Count(DISTINCT UniqueID)),&lt;BR /&gt;'0.0%'&lt;BR /&gt;),&lt;BR /&gt;'N/A'&lt;BR /&gt;),&lt;/P&gt;
&lt;P&gt;'&amp;lt;5'&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tripod6999_0-1741004166375.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178055i8D945989583A527F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tripod6999_0-1741004166375.png" alt="tripod6999_0-1741004166375.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 12:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508025#M479</guid>
      <dc:creator>tripod6999</dc:creator>
      <dc:date>2025-03-03T12:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508350#M480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/244322"&gt;@tripod6999&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you always have 4 values in the the gender field - To get the "correct" previous (above) values use&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above(Total Sum(Number), 4)&lt;/P&gt;
&lt;P&gt;For the YoY change&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Aggr((Sum(Number) - Above(Sum(Number)))/Above(Sum(Number)), Gender, (Year, (NUMERIC, ASCENDING)))&lt;/P&gt;
&lt;P&gt;Regards Jandre&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 08:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508350#M480</guid>
      <dc:creator>JandreKillianRIC</dc:creator>
      <dc:date>2025-03-05T08:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508355#M481</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;try &lt;BR /&gt;IF(&lt;BR /&gt;&amp;nbsp; Count(DISTINCT UniqueID) &amp;gt;= 5 OR Count(DISTINCT UniqueID) = 0,&lt;BR /&gt;&amp;nbsp; IF(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Above(TOTAL Count(DISTINCT UniqueID), 1, Year) &amp;gt; 0,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Num(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Count(DISTINCT UniqueID) - Above(TOTAL Count(DISTINCT UniqueID), 1, Year)) /&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Above(TOTAL Count(DISTINCT UniqueID), 1, Year),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'0.0%'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'N/A'&lt;BR /&gt;&amp;nbsp; &amp;nbsp;),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; '&amp;lt;5'&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;2020 values should be "N/A" and from 2021 onwards, each gender category will have a proper year-on-year percentage change based on the previous year's count&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 08:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508355#M481</guid>
      <dc:creator>diegozecchini</dc:creator>
      <dc:date>2025-03-05T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508374#M482</link>
      <description>&lt;P&gt;Hello Diego,&lt;BR /&gt;Thank you for the reply. That expression seems to work with a very minor change. Instead of the '1' (offset?) in the second part of the expression, I needed to change it to '4'&amp;nbsp; as shown in bold underline below i.e. the expression is:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Count(DISTINCT UniqueID) &amp;gt;= 5 OR Count(DISTINCT UniqueID) = 0,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Above(TOTAL Count(DISTINCT UniqueID), &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;, Year) &amp;gt; 0,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Num(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Count(DISTINCT UniqueID) - Above(TOTAL Count(DISTINCT UniqueID), &lt;U&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/U&gt;, Year)) /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Above(TOTAL Count(DISTINCT UniqueID), &lt;U&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/U&gt;, Year),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'0.0%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'N/A'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; '&amp;lt;5'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you so much for your help in sorting this out. It really was proving to be a real pain.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 08:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508374#M482</guid>
      <dc:creator>tripod6999</dc:creator>
      <dc:date>2025-03-05T08:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508378#M483</link>
      <description>&lt;P&gt;Jandre,&lt;/P&gt;
&lt;P&gt;Thank you for your response. That expression seems to work. For my purposes the expression becomes:&lt;BR /&gt;&lt;BR /&gt;NUM(Aggr((Count(DISTINCT UniqueID) - Above(Count(DISTINCT UniqueID)))/Above(Count(DISTINCT UniqueID)), Gender, (Year, (NUMERIC, ASCENDING))),'0.0%')&lt;BR /&gt;&lt;BR /&gt;Thanks again for your response. It is very much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 09:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508378#M483</guid>
      <dc:creator>tripod6999</dc:creator>
      <dc:date>2025-03-05T09:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508399#M484</link>
      <description>&lt;P&gt;ops, sorry for mistake. Glad to be helpful.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 10:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508399#M484</guid>
      <dc:creator>diegozecchini</dc:creator>
      <dc:date>2025-03-05T10:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508400#M485</link>
      <description>&lt;P&gt;Diego,&lt;/P&gt;
&lt;P&gt;No worries and it did help me to solve the problem so thank you!&lt;BR /&gt;&lt;BR /&gt;Francis&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 16:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508400#M485</guid>
      <dc:creator>tripod6999</dc:creator>
      <dc:date>2025-03-05T16:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Year on Year change</title>
      <link>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508455#M486</link>
      <description>&lt;P&gt;Hello Diego,&lt;/P&gt;
&lt;P&gt;A problem that I have encountered with the expression is when I filter on a dimension and the number of values within each year in the field 'Gender' aren't the same, it gives the incorrect values. Is there any way of ensuring that the expression matches on the values in the Gender field and if not gives an N/A again? i.e. if there aren't any 'Other' values in a previous year, it does not match to 'Prefer not to say' as that would be the row that is selected. In other words, the 'Offset' value of 4 might vary. I hope that makes sense.&lt;BR /&gt;&lt;BR /&gt;Francis&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 15:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Insight-Advisor/Percentage-Year-on-Year-change/m-p/2508455#M486</guid>
      <dc:creator>tripod6999</dc:creator>
      <dc:date>2025-03-05T15:59:30Z</dc:date>
    </item>
  </channel>
</rss>

