<?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 Calculating expression containing two aggregated expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448961#M167516</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 am having some difficulties calculating an expression.&lt;/P&gt;&lt;P&gt;I have a table looking like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="350"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="left" height="19" width="115"&gt;&lt;P&gt;number of hours&lt;/P&gt;&lt;/TD&gt;&lt;TD align="left" width="35"&gt;date&lt;/TD&gt;&lt;TD align="left" width="66"&gt;project id&lt;/TD&gt;&lt;TD align="left" width="49"&gt;task id&lt;/TD&gt;&lt;TD align="left" width="85"&gt;employee id&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table contains daily working hours of employees for tasks that are a part of a certain project.&lt;/P&gt;&lt;P&gt;I would like to display the cost of each project by calculating for each employee, the number of hours spent on a project for a month, divided by the total number of hours worked by the employee that same month. After I get that I would want to multiply the result by the employee's salary for that month, and then summarize all results to get the total cost of a project.&lt;/P&gt;&lt;P&gt;I tried using this: &lt;/P&gt;&lt;P&gt;=sum((Aggr(sum([Employee Task Minutes])/sum({$&amp;lt;[Task ID]=, [Project Number]=&amp;gt;}[Employee Task Minutes]), YYYYMM))*vHourCost*vMonthlyHours)&lt;/P&gt;&lt;P&gt;This, unfortunately, does not work.&lt;/P&gt;&lt;P&gt;Does anyone have an idea for this?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaniv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Mar 2013 07:42:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-18T07:42:28Z</dc:date>
    <item>
      <title>Calculating expression containing two aggregated expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448961#M167516</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 am having some difficulties calculating an expression.&lt;/P&gt;&lt;P&gt;I have a table looking like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="350"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="left" height="19" width="115"&gt;&lt;P&gt;number of hours&lt;/P&gt;&lt;/TD&gt;&lt;TD align="left" width="35"&gt;date&lt;/TD&gt;&lt;TD align="left" width="66"&gt;project id&lt;/TD&gt;&lt;TD align="left" width="49"&gt;task id&lt;/TD&gt;&lt;TD align="left" width="85"&gt;employee id&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table contains daily working hours of employees for tasks that are a part of a certain project.&lt;/P&gt;&lt;P&gt;I would like to display the cost of each project by calculating for each employee, the number of hours spent on a project for a month, divided by the total number of hours worked by the employee that same month. After I get that I would want to multiply the result by the employee's salary for that month, and then summarize all results to get the total cost of a project.&lt;/P&gt;&lt;P&gt;I tried using this: &lt;/P&gt;&lt;P&gt;=sum((Aggr(sum([Employee Task Minutes])/sum({$&amp;lt;[Task ID]=, [Project Number]=&amp;gt;}[Employee Task Minutes]), YYYYMM))*vHourCost*vMonthlyHours)&lt;/P&gt;&lt;P&gt;This, unfortunately, does not work.&lt;/P&gt;&lt;P&gt;Does anyone have an idea for this?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaniv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 07:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448961#M167516</guid>
      <dc:creator />
      <dc:date>2013-03-18T07:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating expression containing two aggregated expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448962#M167517</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>Mon, 18 Mar 2013 07:47:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448962#M167517</guid>
      <dc:creator />
      <dc:date>2013-03-18T07:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating expression containing two aggregated expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448963#M167518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added a photo showing the wanted pivot table. The 'Total hours reported' column shows the hours reported for that task, now I want to get the total number of hours reported by the employee for the months that project was reported as being worked on. &lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="35105" class="jive-image-thumbnail jive-image" onclick="" alt="print screen.png" src="/legacyfs/online/35105_print screen.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2013 07:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-expression-containing-two-aggregated-expressions/m-p/448963#M167518</guid>
      <dc:creator />
      <dc:date>2013-03-18T07:58:09Z</dc:date>
    </item>
  </channel>
</rss>

