<?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 Relative values on stacked bar chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507802#M104404</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm struggling with this problem: I have a stacked bar chart with Year (Stack) and Class (Bar) as dimensions and an expression like this to count deliveries&amp;nbsp;Count(distinct [Deliveries]). It works. Every stack is colored in a specific way (field called Color).&lt;/P&gt;
&lt;P&gt;I'm trying to have the same bar chart but I need % values. I tried with this expression&amp;nbsp;Count(Deliveries) / Count(TOTAL &amp;lt;Year&amp;gt; Deliveries) but it doesn't works: I have every stack on value "1". the wierd thing is that if I create a table with that expression... I have the correct % values!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mike_spada_1-1740743448521.png" style="width: 820px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177999i764C16337E70AA4C/image-dimensions/820x123?v=v2" width="820" height="123" role="button" title="mike_spada_1-1740743448521.png" alt="mike_spada_1-1740743448521.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The question is... why?? And... how can I solve it?&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;Mike.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 11:52:53 GMT</pubDate>
    <dc:creator>mike_spada</dc:creator>
    <dc:date>2025-02-28T11:52:53Z</dc:date>
    <item>
      <title>Relative values on stacked bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507802#M104404</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm struggling with this problem: I have a stacked bar chart with Year (Stack) and Class (Bar) as dimensions and an expression like this to count deliveries&amp;nbsp;Count(distinct [Deliveries]). It works. Every stack is colored in a specific way (field called Color).&lt;/P&gt;
&lt;P&gt;I'm trying to have the same bar chart but I need % values. I tried with this expression&amp;nbsp;Count(Deliveries) / Count(TOTAL &amp;lt;Year&amp;gt; Deliveries) but it doesn't works: I have every stack on value "1". the wierd thing is that if I create a table with that expression... I have the correct % values!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mike_spada_1-1740743448521.png" style="width: 820px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177999i764C16337E70AA4C/image-dimensions/820x123?v=v2" width="820" height="123" role="button" title="mike_spada_1-1740743448521.png" alt="mike_spada_1-1740743448521.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The question is... why?? And... how can I solve it?&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;Mike.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 11:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507802#M104404</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2025-02-28T11:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Relative values on stacked bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507806#M104405</link>
      <description>&lt;P&gt;It should be working - you may check various settings especially the ones how the dimensions are defined because yours shows Year and Class on the bottom ...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marcus_sommer_0-1740745599617.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178000iBE3CB9A1BACC6722/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marcus_sommer_0-1740745599617.png" alt="marcus_sommer_0-1740745599617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 12:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507806#M104405</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-28T12:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Relative values on stacked bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507811#M104406</link>
      <description>&lt;P&gt;Thank you Marcus, I noticed that the dimension that I identified with "Class" was calculated as "=If(Year&amp;lt;Year(Today()), Class)", if I replace it simply with "Class" it works.&lt;/P&gt;
&lt;P&gt;Have you any idea if I wish to keep that formula on dimension?&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;M.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 12:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507811#M104406</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2025-02-28T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Relative values on stacked bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507814#M104407</link>
      <description>&lt;P&gt;You could try to include the condition within the expression, like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt; Year = {"&amp;lt;$(=year(today()))"}&amp;gt;} Deliveries)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 13:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Relative-values-on-stacked-bar-chart/m-p/2507814#M104407</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-28T13:03:21Z</dc:date>
    </item>
  </channel>
</rss>

