<?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: Calculated dimension in chart and total in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513698#M457418</link>
    <description>&lt;P&gt;Not entirely sure, but does this help&lt;/P&gt;&lt;PRE&gt;=Aggr(NODISTINCT Count(DISTINCT {$*BM01}  [person_id]), year)&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Nov 2018 15:15:11 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-11-28T15:15:11Z</dc:date>
    <item>
      <title>Calculated dimension in chart and total</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513689#M457417</link>
      <description>&lt;P&gt;I have a stacked bar chart where the columns are split by a calculated dimension. What I want to have is a stacked barchart with all bars showing the percentages (i.e. summing to 1)&lt;/P&gt;&lt;P&gt;DIMENSIONS&lt;/P&gt;&lt;P&gt;Dim 1 year&lt;BR /&gt;Dim 2 =aggr({$*BM01} count(distinct [case_id]),&amp;nbsp; [person_id], [year] )&lt;/P&gt;&lt;P&gt;EXPRESSIONS&lt;/P&gt;&lt;P&gt;No of unique persons&amp;nbsp;&lt;BR /&gt;=count(distinct {$*BM01} [person_id])&lt;BR /&gt;Total for each year&lt;BR /&gt;=count( total &amp;lt;[year]&amp;gt;&amp;nbsp;distinct&amp;nbsp; {$*BM01}&amp;nbsp; [person_id])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the two expressions just gives me the same numbers, and I have also tried with the &amp;lt;person id&amp;gt; after the total. Any other suggestions for how to achieve what I wanted?&lt;/P&gt;&lt;P&gt;So far, the best solution I have tried is a Mekko-chart, however,&amp;nbsp;I am still not able to find out how to get labels with dim 2's share of each column.&lt;/P&gt;&lt;P&gt;Moving the calculation to the script is not an option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:15:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513689#M457417</guid>
      <dc:creator>elrelrelr</dc:creator>
      <dc:date>2018-11-28T15:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension in chart and total</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513698#M457418</link>
      <description>&lt;P&gt;Not entirely sure, but does this help&lt;/P&gt;&lt;PRE&gt;=Aggr(NODISTINCT Count(DISTINCT {$*BM01}  [person_id]), year)&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Nov 2018 15:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513698#M457418</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-28T15:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension in chart and total</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513709#M457419</link>
      <description>Great, that was exactly what i needed &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;(Now i just need to understand why that worked)</description>
      <pubDate>Wed, 28 Nov 2018 15:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-chart-and-total/m-p/1513709#M457419</guid>
      <dc:creator>elrelrelr</dc:creator>
      <dc:date>2018-11-28T15:24:05Z</dc:date>
    </item>
  </channel>
</rss>

