<?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: AVG and SUM in same chart... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992378#M946438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Peter,&lt;/P&gt;&lt;P&gt;under graphic aspect it works, thanks... but I have problem with average calculation yet...&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Dec 2015 15:56:59 GMT</pubDate>
    <dc:creator>mike_spada</dc:creator>
    <dc:date>2015-12-28T15:56:59Z</dc:date>
    <item>
      <title>AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992372#M946432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I have an issue with this scenario: I have these data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 331px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl69" height="17" width="210"&gt;Division&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="63"&gt;2014&lt;/TD&gt;&lt;TD class="xl70" style="border-left: none;" width="58"&gt;AVG 2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;2 IT&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 849,00 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 38,59 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;3 GRAPHICS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 567,75 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 113,55 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;4 ADMINISTRATION&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.221,00 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 203,50 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;5 PRODUCTION&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.385,50 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 187,81 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;6 SELLINGS&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 686,00 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 228,67 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;7 PURCHASES&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 331,00 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 165,50 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;8 QUALITY&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.707,75 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 131,37 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;9 WAREHOUSE&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 757,75 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 252,58 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;11 TOOLS&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 425,75 &lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 212,88 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;Totals&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp; 12.931,50 &lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp; 1.534,44 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I want to obtain a chart like the one in the picture attached, in which as dimension I have the Divisions, in left the sum of column 2014 (bar chart) and a line chart which average (column AVG 2014).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying but don't succeed in build it... anyone can help please?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 14:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992372#M946432</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T14:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992373#M946433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The provided data is already aggregated, can you provide non-aggregated sample so that we can help you. It would be even better if you can provide the sample where it isn't working for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992373#M946433</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-28T15:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992374#M946434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it's not simple because is a big application with many complications.&lt;/P&gt;&lt;P&gt;I'll try to post soon.&lt;/P&gt;&lt;P&gt;To calculate 2014 amount I use a set analysis like&lt;/P&gt;&lt;P&gt;sum({ $&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemCode = {'0353'}&amp;gt;}&amp;nbsp; amount)&lt;/P&gt;&lt;P&gt;and it works: I want to sum amount columne for itemCode = 0353&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know how use avg...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992374#M946434</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T15:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992375#M946435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Create a combo chart&lt;/LI&gt;&lt;LI&gt;Ad dimension, select Divisions&lt;/LI&gt;&lt;LI&gt;As expressions, add the sum() and avg() expressions you used to produce the data in your OP.&lt;/LI&gt;&lt;LI&gt;For each expression, select the correct "Display Options": Bar &amp;amp; Line. For the line chart, add a symbol of your choice (triangles)&lt;/LI&gt;&lt;LI&gt;In the Axis tab, select the Sum expression and in Position select&lt;EM&gt; Left&lt;/EM&gt;. For the other expression select Position = &lt;EM&gt;Right&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;In the Axis tab, enable both axes by setting their width to at least 1 pixel. Enable "Show Grid" for both dimension and expressions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should about do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. There is no Totals-amount in your image so there won't be any in my explanation. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992375#M946435</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-28T15:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992376#M946436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What kind of average are you talking about? Monthly average? Average per product item? Average per employee? ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992376#M946436</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-28T15:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992377#M946437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;we are talking about hours for cost center. So, my sum is: "total of hours for cost center", the average is "average of hours for employee in that cost center".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992377#M946437</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T15:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992378#M946438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Peter,&lt;/P&gt;&lt;P&gt;under graphic aspect it works, thanks... but I have problem with average calculation yet...&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 15:56:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992378#M946438</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T15:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992379#M946439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Are your cost centers exclusive to Divisions, or do they overlap multiple divs?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;got it. The sum already handles Cost Centers, so the avg will too. Only one quesiton. What exactly is ItemCode and how do you want it to impact the average?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a first attempt, you can try (replace hours with amount if you use field amount to store a number of hours...):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({ $&amp;lt;itemCode = {'0353'}&amp;gt;}&amp;nbsp; hours) / count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{ $&amp;lt;itemCode = {'0353'}&amp;gt;} &lt;/SPAN&gt;distinct&amp;nbsp; employeeID)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 16:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992379#M946439</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-28T16:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992380#M946440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, in my representation Cost Center = Division...&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 16:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992380#M946440</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T16:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992381#M946441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ItemCode 0353 is an item that contain a particular type of hours (for examples, over times) that are the object of this analysis. In my app every voice contains a type of hour (is a hr app).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 17:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992381#M946441</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T17:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: AVG and SUM in same chart...</title>
      <link>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992382#M946442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I succeed in make my chart. Thanks to Peter that tell me how to have a chart as required.&lt;/P&gt;&lt;P&gt;For the formula, I use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total:&lt;/P&gt;&lt;P&gt;= sum({ 1&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemCode = {'0353'}, year={$(=Max(year))},month = ,company={$(=Max(company))}&amp;gt;}&amp;nbsp; amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of Employees (not shown in chart but calculated with a formula in others part of my app):&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;sum({ $&amp;lt;&lt;/TD&gt;&lt;TD&gt;itemCode2ndType = {'3603'},year={$(=Max(year))},month={$(=Max(month))}&amp;gt;}&amp;nbsp; totalEmployees)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Average:&lt;/P&gt;&lt;P&gt;sum({ 1&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemCode = {'0353'},year={$(=Max(year))},month = ,company={$(=Max(company))}&amp;gt;}&amp;nbsp; amount)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({ $&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemCode2ndType = {'3603'},year={$(=Max(year))},month={$(=Max(month))}&amp;gt;}&amp;nbsp; totalEmployees)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if there is a better way to obtain this result... if anyone can see what I don't see &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am open minded &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 17:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AVG-and-SUM-in-same-chart/m-p/992382#M946442</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2015-12-28T17:48:38Z</dc:date>
    </item>
  </channel>
</rss>

