<?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: Expression for weighted average? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055767#M938218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Department" = 'Dept1', 'Dept2', and 'Dept3'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Percentage" is the metric I need to sum for all three departments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dept1 has 6 Lines, Dept2 has 3 Lines, and Dept3 has 9 Lines. I need to sum "Percentage" as a weighted average, because each department has a different number of Lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2016 22:22:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-04T22:22:17Z</dc:date>
    <item>
      <title>Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055763#M938214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I need to calculate the sum of three Departments' downtime based on metrics per Line. I need to calculate it as a weighted average as each Department has a different number of Lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what is wrong with my syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Department&lt;/SPAN&gt; = {('Dept1'/6), ('Dept2'/3), ('Dept3'/9)}&amp;gt;}Percentage)&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 12pt;"&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055763#M938214</guid>
      <dc:creator />
      <dc:date>2016-02-04T21:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055764#M938215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to divide dimension values by 6, 3 and 9, not the sum of the measures related to those values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Split that thing into 3 (sub-) expressions (one for each dept) and divide the result of each expression to the right weight. Add those together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055764#M938215</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-02-04T21:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055765#M938216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's hard to tell without knowing something about your model, fields, data values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;('Dept1'/6), ('Dept2'/3), ('Dept3'/9)? Field values in Department?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try something like&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: 16px;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Department&lt;/SPAN&gt; = {'Dept1','Dept2','Dept3'} &amp;gt;}&amp;nbsp; Downtime&lt;/SPAN&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/ Count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Department&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt; = {'Dept1','Dept2','Dept3'} &amp;gt;} &lt;/SPAN&gt; Downtime) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055765#M938216</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-04T21:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055766#M938217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you show me please? I'm not getting the syntax right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this is basically what I need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Department&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Dept1'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Percentage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) /6&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Department&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Dept2'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Percentage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) /3&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Department&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Dept3'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Percentage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) /9&lt;/SPAN&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;How do I add them together? Sorry - I'm learning!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 22:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055766#M938217</guid>
      <dc:creator />
      <dc:date>2016-02-04T22:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055767#M938218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Department" = 'Dept1', 'Dept2', and 'Dept3'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Percentage" is the metric I need to sum for all three departments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dept1 has 6 Lines, Dept2 has 3 Lines, and Dept3 has 9 Lines. I need to sum "Percentage" as a weighted average, because each department has a different number of Lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 22:22:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055767#M938218</guid>
      <dc:creator />
      <dc:date>2016-02-04T22:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055768#M938219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put them all in 1 line and put a + symbol between them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a best guess of course, as I don't know your data model and also am not 100% sure about what you are aiming at.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 22:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055768#M938219</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-02-04T22:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055769#M938220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 22:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055769#M938220</guid>
      <dc:creator />
      <dc:date>2016-02-04T22:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Expression for weighted average?</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055770#M938221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Happy I could help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2016 22:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-for-weighted-average/m-p/1055770#M938221</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-02-04T22:38:42Z</dc:date>
    </item>
  </channel>
</rss>

