<?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: Simulating 3 dimensions in bar chart? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Simulating-3-dimensions-in-bar-chart/m-p/138593#M9736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( &lt;SPAN style="font-size: 10pt;"&gt;aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; pick(match(subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',2),'A','F'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Dept=subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',1) and AScore=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,User),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Dept=subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',1) and FScore=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,User)),&lt;/P&gt;&lt;P&gt;User,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;)&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2018 16:20:15 GMT</pubDate>
    <dc:creator>stascher</dc:creator>
    <dc:date>2018-09-18T16:20:15Z</dc:date>
    <item>
      <title>Simulating 3 dimensions in bar chart?</title>
      <link>https://community.qlik.com/t5/App-Development/Simulating-3-dimensions-in-bar-chart/m-p/138592#M9735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this can work, but I've got the following table&lt;SPAN style="font-size: 10pt;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Dept&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;User&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;AScore&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FScore&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Bob&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Sally&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jenn&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Marty&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each user will have an AScore (1-5) and an FScore (1-5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a stacked bar chart that counts the number of users for each department and score type (A/F), by score value (1-5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart should have &lt;STRONG&gt;Dept &amp;amp; score type&lt;/STRONG&gt; on the Y-axis and bar segments that count users by &lt;STRONG&gt;score value&lt;/STRONG&gt; for the given Dept &amp;amp; score type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To simplify things I created a separate table that concats distinct Dept and score type for each existing score value, thereby converting 3 dimensions into 2:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Dept_Type&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Score&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1_A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1_A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1_F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1_F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2_A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2_A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2_F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2_F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping I could create the stacked bar chart with Dept_Type as dimension 1,&amp;nbsp; Score as dimension 2 and then create a measure that counts users by dept, type and value with an expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Right(Dept_Type,1)='A',&lt;/P&gt;&lt;P&gt;count( {&amp;lt;Dept={$(=left(Dept_Type,2))}, AScore=Score&amp;gt;} User),&amp;nbsp;&amp;nbsp; // count users by AScore&lt;/P&gt;&lt;P&gt;count( {&amp;lt;Dept={&lt;SPAN style="font-size: 13.3333px;"&gt;$(=left(Dept_Type,2))&lt;/SPAN&gt;}, FScore=Score&amp;gt;} User)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // count users by FScore&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this doesn't work.&amp;nbsp; Am I doing something wrong or am I trying to do the impossible?&amp;nbsp;&amp;nbsp; FYI the reason I don't just count records in the Dept_Type/Score table is that I want the resulting bar chart to be reactive to User and Dept selections. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Simulating-3-dimensions-in-bar-chart/m-p/138592#M9735</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2024-11-16T07:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating 3 dimensions in bar chart?</title>
      <link>https://community.qlik.com/t5/App-Development/Simulating-3-dimensions-in-bar-chart/m-p/138593#M9736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( &lt;SPAN style="font-size: 10pt;"&gt;aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; pick(match(subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',2),'A','F'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Dept=subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',1) and AScore=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,User),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Dept=subfield(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;,'_',1) and FScore=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,User)),&lt;/P&gt;&lt;P&gt;User,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Score&lt;/SPAN&gt;,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dept_Type&lt;/SPAN&gt;)&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 16:20:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Simulating-3-dimensions-in-bar-chart/m-p/138593#M9736</guid>
      <dc:creator>stascher</dc:creator>
      <dc:date>2018-09-18T16:20:15Z</dc:date>
    </item>
  </channel>
</rss>

