<?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: How to Group Values within a Field and show on Bar Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443264#M561984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create either a new field in the script or a calculated dimension in your chart (the former is the better option). Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match([Case Type],'AB','CD'),'Field_1',if(match([Case Type],'EF','GH'),'Field_2','IK'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 17:10:32 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-03-14T17:10:32Z</dc:date>
    <item>
      <title>How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443263#M561983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with two dimensions ("Region", "Case Type") and one expression ("Hours"). My chart currently looks like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="34926" class="jive-image" alt="FSR Duration ScreenShot.PNG" src="/legacyfs/online/34926_FSR Duration ScreenShot.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The numbers on the Y-axis denote the "Hours". X-axis has the "Region" values and different "Case Type"s are stacked for each region (each case type colored differently).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know if I can put a number of these "case type"s into different groups. &lt;STRONG&gt;Do you have any suggestions on how to achieve this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To give an example - Let's say "Case Type" dimension has a total of 5 values: AB, CD, EF, GH, IK. What I'd like to do is group these different fields - like 'AB' and 'CD' become 'Field_1', 'EF' and 'GH' become 'Field_2', and 'IK' stays as 'IK'. In the end, I'd like to show these grouped values ('Field_1', 'Field_2' and 'IK') stacked for each region (3 colors instead of 5 colors for each region).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't use grouping, since grouping works for different fields and I'm trying to group different values for a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443263#M561983</guid>
      <dc:creator />
      <dc:date>2013-03-14T17:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443264#M561984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create either a new field in the script or a calculated dimension in your chart (the former is the better option). Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(match([Case Type],'AB','CD'),'Field_1',if(match([Case Type],'EF','GH'),'Field_2','IK'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443264#M561984</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-14T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443265#M561985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Gysbert. I'm using the calculated dimension method however it gives me a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this expression in the "Edit Expression" window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10pt;"&gt;If(Match([Case Type], 'AB', 'CD'), 'Field_1', If(Match([Case Type], 'EF', 'GH'), 'Field_2', 'IK'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Am i doing something wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443265#M561985</guid>
      <dc:creator />
      <dc:date>2013-03-14T17:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443266#M561986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Match(&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;, 'AB', 'CD'), 'Field_1', If(Match(&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;, 'EF', 'GH'), 'Field_2', 'IK'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post a sample file or screenshot ur expression with error msg?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 17:53:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443266#M561986</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-14T17:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443267#M561987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you get a syntax error the most likely cause is that Case Type is not the name of your dimension. You posted that Case Type was the dimension so that's what I used. Replace Case Type with the exact name of your dimension. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 18:12:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443267#M561987</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-14T18:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443268#M561988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, that's not the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 00:58:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443268#M561988</guid>
      <dc:creator />
      <dc:date>2013-03-15T00:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443269#M561989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer Mayil. I'm not writing that exact expression (which I gave as an example above). Sorry for not being very clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression that I'm writing in the "Calculated Dimension" - Dimension name and field names are modified (I'm using QlikView 11) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=If(Match(&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, 'AB EXAMPLE', 'EXAMPLE CD'), 'Field 1', If(Match(&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, 'EF', 'GH'), 'Field 2', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;If(Match(&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, 'EF EXAMPLE', 'EXAMPLE GH'), 'Field 3', &lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;If(Match(&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, 'DD EXAMPLE', 'EXAMPLE EE'), 'Field 4', &lt;/SPAN&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;If(Match(&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; font-size: 10pt; color: #737373; font-family: Arial;"&gt;[Case Type]&lt;/EM&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;, 'DC EXAMPLE'), 'Field 5',&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial; font-size: 10pt;"&gt; 'IK EXAMPLE'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 01:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443269#M561989</guid>
      <dc:creator />
      <dc:date>2013-03-15T01:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443270#M561990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you upload the sample application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 04:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443270#M561990</guid>
      <dc:creator />
      <dc:date>2013-03-15T04:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443271#M561991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you nest if statements you need to make sure all the parentheses match:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Match([Case Type], 'AB EXAMPLE', 'EXAMPLE CD'), 'Field 1', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'EF', 'GH'), 'Field 2',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'EF EXAMPLE', 'EXAMPLE GH'), 'Field 3', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'DD EXAMPLE', 'EXAMPLE EE'), 'Field 4', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'DC EXAMPLE'), 'Field 5', 'IK EXAMPLE'))&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, you should probably create an extra field in the script using a mapping table and applymap. That will perform a lot better than if statements nested four levels deep.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 09:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443271#M561991</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-15T09:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Group Values within a Field and show on Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443272#M561992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi Gysbert,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks for the tip. I have one more requirement in the below expression.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=If(Match([Case Type], 'AB EXAMPLE', 'EXAMPLE CD'), 'Field 1',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'EF', 'GH'), '&lt;STRONG&gt;Field 2&lt;/STRONG&gt;',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'EF EXAMPLE', 'EXAMPLE GH'), 'Field 3',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'DD EXAMPLE', 'EXAMPLE EE'), 'Field 4',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Case Type], 'DC EXAMPLE'), 'Field 5', 'IK EXAMPLE'))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For Eg: If Field 2 does not have any value, it is not getting displayed in the chart. I have tried removing the Suppress Null option. But it did not work out. &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to have Field 2 and it should show as zero. How can I achieve it? Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2016 23:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Group-Values-within-a-Field-and-show-on-Bar-Chart/m-p/443272#M561992</guid>
      <dc:creator />
      <dc:date>2016-01-27T23:02:18Z</dc:date>
    </item>
  </channel>
</rss>

