<?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: Stacked bar chart and count expression showing two instead of one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877940#M470744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple qvw-file that shows the problem. Line1 has two MajorGrade-types so the x-axes shows two eventhough the calculation gives one. My data loads from one excel file that has multiple lines per unit if it is connected to different types of grades.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Heidi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 May 2015 06:18:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-06T06:18:41Z</dc:date>
    <item>
      <title>Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877938#M470742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a stacked bar chart that shows the number of units (paper machines in this case). The problem is that when one unit has multiple characteristics in the right cyclic group (major grade in this case), the x-axes shows one unit as two. Is there a way to get the calculation show correctly only one unit in x-axes?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Onebecomestwowhenstacked.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85675_Onebecomestwowhenstacked.PNG" style="height: 184px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Heidi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 11:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877938#M470742</guid>
      <dc:creator />
      <dc:date>2015-05-05T11:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877939#M470743</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;This looks like a data model problem. I suggest that you post a sample qvd file with a subset of the real data that exhibits the problem for accurate diagnosis. At the very minimum, post your expression and a diagram of your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, do you perform a join in the load that is adding data records due to a non-unique key? Or does the expression span tables with different granularity levels?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 11:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877939#M470743</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-05-05T11:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877940#M470744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple qvw-file that shows the problem. Line1 has two MajorGrade-types so the x-axes shows two eventhough the calculation gives one. My data loads from one excel file that has multiple lines per unit if it is connected to different types of grades.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Heidi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 06:18:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877940#M470744</guid>
      <dc:creator />
      <dc:date>2015-05-06T06:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877941#M470745</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;You are using Dimension as MajorGrade as Dimension and Line1 is applicable for both the MajorGrades.&amp;nbsp; In chart the distinct count is calculated by Dimension, that is why you are getting Line1 in both the MajorGrades and getting count as 2.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you remove &lt;SPAN style="font-size: 13.3333330154419px;"&gt;MajorGrade, then your count will be 1 only.&amp;nbsp; To solve this you can mark the first entry to one of the MajorGrades in script and use the Sum of it in the expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;Name, MajorGrade, Area&lt;/P&gt;&lt;P&gt;Line1, Market, EMEA&lt;/P&gt;&lt;P&gt;Line1, Tissue, EMEA&lt;/P&gt;&lt;P&gt;Line2, Market, EMEA&lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;If(Peek(Name) &amp;lt;&amp;gt; Name, 1, 0) AS Count&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY Name, Area, MajorGrade;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in chart use below expression&lt;/P&gt;&lt;P&gt;Sum(Count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 07:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877941#M470745</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-05-06T07:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877942#M470746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I mark the line to one major grade, and use it in calculations, the other major grade doesn't "show" anymore? Or does it? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 07:48:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877942#M470746</guid>
      <dc:creator />
      <dc:date>2015-05-07T07:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Stacked bar chart and count expression showing two instead of one</title>
      <link>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877943#M470747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think removing the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;MajorGrade dimension &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;is the best option, you can no way solve this by using the two dimensions.&amp;nbsp; Because Line1 is applicable to both the Major Grades.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;It is up to you to choose which option you are going with.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 08:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stacked-bar-chart-and-count-expression-showing-two-instead-of/m-p/877943#M470747</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-05-07T08:00:52Z</dc:date>
    </item>
  </channel>
</rss>

