<?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: Set Analysis Question? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286934#M582432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;BUYSELL={B}&amp;gt;} total&amp;lt;DATE, HOURENDING&amp;gt; COST)*only({&amp;lt;BUYSELL={S}&amp;gt;}QUANTITY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; / sum({&amp;lt;BUYSELL={B}&amp;gt;} total&amp;lt;DATE,HOURENDING&amp;gt; QUANTITY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression in your pivot table chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2011 22:57:43 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-12-07T22:57:43Z</dc:date>
    <item>
      <title>Set Analysis Question?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286933#M582431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate a field for a subset of records using data from records that are not selected. I think this can be done using set analysis but I haven't been able to figure it yet. It seems like everything I try creates records in my table for the purchases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each sale in the below table, I am trying to calculate the pro-rata cost as the sum of the purchase costs * quantity for that contract / sum of purchase quantities.&amp;nbsp; In my example below, I am calculating the Cost for Contract 51 HourEnding14 as (934.67 + 1652.38) * 100 / (53.22 + 95.78)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Data:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sample data.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9298_sample+data.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Desired Output:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="desired output.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/9297_desired+output.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there away to do this without creating a separate table for the total purchase costs and quantities?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help -&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 22:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286933#M582431</guid>
      <dc:creator />
      <dc:date>2011-12-07T22:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Question?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286934#M582432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;BUYSELL={B}&amp;gt;} total&amp;lt;DATE, HOURENDING&amp;gt; COST)*only({&amp;lt;BUYSELL={S}&amp;gt;}QUANTITY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; / sum({&amp;lt;BUYSELL={B}&amp;gt;} total&amp;lt;DATE,HOURENDING&amp;gt; QUANTITY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression in your pivot table chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 22:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286934#M582432</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-07T22:57:43Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Question?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286935#M582433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan - That's exactly what I needed!&amp;nbsp; I was not familiar with the only function.&amp;nbsp; Thanks for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 23:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Question/m-p/286935#M582433</guid>
      <dc:creator />
      <dc:date>2011-12-07T23:06:04Z</dc:date>
    </item>
  </channel>
</rss>

