<?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: Percentage display on a Stacked Bar Chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517632#M36995</link>
    <description>&lt;P&gt;Yes, That does the work, thank you.&lt;/P&gt;&lt;P&gt;The only thing I wanted to keep the Age Group as a calculated dimension so user can change the age range if they want, but I guess the only way to do it is with aggr function and it cannot be used with calculated dimension.&lt;/P&gt;&lt;P&gt;Am I right?&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 20:29:20 GMT</pubDate>
    <dc:creator>deniscamh</dc:creator>
    <dc:date>2018-12-06T20:29:20Z</dc:date>
    <item>
      <title>Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517610#M36987</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;Here is my issue:&lt;/P&gt;&lt;P&gt;I am trying to create a stacked bar chart that represents number of employees by Age group for different departments.&lt;/P&gt;&lt;P&gt;So I managed to do that with the following formula for meassure:&lt;/P&gt;&lt;P&gt;count({&amp;lt;[Employee Current Status Short Descrip] = {'Active','On Leave'}&amp;gt;} distinct EMPLOYEE)&lt;/P&gt;&lt;P&gt;And Dimension 1 is Department and Dimension 2 is Class(Current Age,10).&lt;/P&gt;&lt;P&gt;Now it works and it shows number of employees for each Age Group by department.&lt;/P&gt;&lt;P&gt;But what I have a request for is to represent relative % values for each Age Group by department.&lt;/P&gt;&lt;P&gt;So I tried something like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;count({&amp;lt;[Employee Current Status Short Descrip] = {'Active','On Leave'}&amp;gt;} distinct EMPLOYEE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;count({&amp;lt;[Employee Current Status Short Descrip] = {'Active','On Leave'}&amp;gt;} total &amp;lt;Department&amp;gt; distinct EMPLOYEE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it does not work because one employee can be in different Age group as my data is for multiple years and by using distinct function my total is less that it suppose to be.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For Example for department 1 I have&amp;nbsp; 3 employee in 20&amp;lt;=yr&amp;lt;30; 5 employee in 30&amp;lt;=yr&amp;lt;40, 10 employee 40&amp;lt;=yr&amp;lt;50. So obviously my total should be 18 bu because I have two employees that moved from one group to another during the period my total is 16 and it gives wrong results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone has any idea how I can solve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517610#M36987</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T19:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517612#M36988</link>
      <description>&lt;P&gt;Can you check if this works for you&lt;/P&gt;&lt;PRE&gt;Count({&amp;lt;[Employee Current Status Short Descrip] = {'Active', 'On Leave'}&amp;gt;} DISTINCT EMPLOYEE)
/
Aggr(NODISTINCT Count({&amp;lt;[Employee Current Status Short Descrip] = {'Active', 'On Leave'}&amp;gt;} DISTINCT EMPLOYEE), Department)&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517612#M36988</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-06T19:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517615#M36989</link>
      <description>&lt;P&gt;Unfortunately it still produced the distinct count.&lt;/P&gt;&lt;P&gt;Thanks for a quick replay.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 19:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517615#M36989</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T19:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517618#M36990</link>
      <description>Would you be able to share some mocked up data to see the issue?</description>
      <pubDate>Thu, 06 Dec 2018 20:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517618#M36990</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-06T20:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517620#M36991</link>
      <description>&lt;P&gt;Please see the attached file with the data I am working with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517620#M36991</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T20:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517628#M36994</link>
      <description>&lt;P&gt;Try it this way....&lt;/P&gt;&lt;P&gt;1) Modify your script to create Current_Age_Bucket in the script&lt;/P&gt;&lt;PRE&gt;Table:
LOAD UniqueIdentif, 
     EMPLOYEE, 
     Date, 
     [Employee Current Status], 
     FiscalYear, 
     [Employee Current Status Short Descrip], 
     [Employee Current Status Descrip], 
     [Current Age], 
     [Foundation Department],
    &lt;FONT color="#FF0000"&gt; Class([Current Age],10) as Current_Age_Bucket&lt;/FONT&gt;
FROM
[..\..\Downloads\pull for bar chart percent.xlsx]
(ooxml, embedded labels, table is Sheet1);&lt;/PRE&gt;&lt;P&gt;2) Use this expression&lt;/P&gt;&lt;PRE&gt;Count({&amp;lt;[Employee Current Status Short Descrip] = {'Active','On Leave'}&amp;gt;} DISTINCT EMPLOYEE)&lt;BR /&gt;/&lt;BR /&gt;Sum(TOTAL &amp;lt;[Foundation Department]&amp;gt; Aggr(Count({&amp;lt;[Employee Current Status Short Descrip] = {'Active','On Leave'}&amp;gt;} DISTINCT EMPLOYEE), [Foundation Department], Current_Age_Bucket))&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1757i238FC84450BD5494/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517628#M36994</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-06T20:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517632#M36995</link>
      <description>&lt;P&gt;Yes, That does the work, thank you.&lt;/P&gt;&lt;P&gt;The only thing I wanted to keep the Age Group as a calculated dimension so user can change the age range if they want, but I guess the only way to do it is with aggr function and it cannot be used with calculated dimension.&lt;/P&gt;&lt;P&gt;Am I right?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:29:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517632#M36995</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T20:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517634#M36996</link>
      <description>&lt;P&gt;Unfortunately, what you have said is all correct. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517634#M36996</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-06T20:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517637#M36997</link>
      <description>&lt;P&gt;Sound good.&lt;/P&gt;&lt;P&gt;Thank you for the solution.&lt;/P&gt;&lt;P&gt;Hope they would not insist to have the age group flexible.....&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517637#M36997</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T20:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517651#M36999</link>
      <description>One, not such a great option, is to pre-calculate all the possible range parameters that the user might like to view by creating multiple class function fields and then conditionally show the bucket based on users input and use the same dimensions within the Aggr() function.</description>
      <pubDate>Thu, 06 Dec 2018 20:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517651#M36999</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-06T20:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage display on a Stacked Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517657#M37000</link>
      <description>&lt;P&gt;Sure if they would insist to have the option will try your solution.&lt;/P&gt;&lt;P&gt;For now I would give it them as hard coded and see what the say.&lt;/P&gt;&lt;P&gt;Thank you for trying to help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 20:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Percentage-display-on-a-Stacked-Bar-Chart/m-p/1517657#M37000</guid>
      <dc:creator>deniscamh</dc:creator>
      <dc:date>2018-12-06T20:59:24Z</dc:date>
    </item>
  </channel>
</rss>

