<?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 help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278056#M1187411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;there's nothing syntactically wrong with your expression.. though you would have to apply the same set analysis expression to both StockValue and SalesValue fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;sum({&amp;lt;[Stock Movement Reason Code] ={3, 5}, Dept={'N'}&amp;gt;} StockValue)/Sum({$&amp;lt;[Stock Movement Reason Code] ={3, 5},Dept={'N'}&amp;gt;}SalesValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgrds,&lt;/P&gt;&lt;P&gt;Abhinava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Sep 2011 11:45:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-21T11:45:26Z</dc:date>
    <item>
      <title>Set Analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278055#M1187410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i need to write an expression using Set Analysis to give me the result of the following..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wastage on CHILLED dept as a % of CHILLED sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my fields are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Stock Movement Reason Code] - (Waste codes are 3 and 5)&lt;/P&gt;&lt;P&gt;[Dept] - (N is CHILLED)&lt;/P&gt;&lt;P&gt;[StockValue) - (Waste Value)&lt;/P&gt;&lt;P&gt;[SalesValue] - (Sales Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following but i can't get the correct result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&amp;nbsp; ( {&amp;lt;[Stock Movement Reason Code] ={3, 5}, Dept={'N'}&amp;gt;} StockValue)/Sum({$&amp;lt;Dept={'N'}&amp;gt;}SalesValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what is wrong with my expression please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 11:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278055#M1187410</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2011-09-21T11:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278056#M1187411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;there's nothing syntactically wrong with your expression.. though you would have to apply the same set analysis expression to both StockValue and SalesValue fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;sum({&amp;lt;[Stock Movement Reason Code] ={3, 5}, Dept={'N'}&amp;gt;} StockValue)/Sum({$&amp;lt;[Stock Movement Reason Code] ={3, 5},Dept={'N'}&amp;gt;}SalesValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgrds,&lt;/P&gt;&lt;P&gt;Abhinava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 11:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278056#M1187411</guid>
      <dc:creator />
      <dc:date>2011-09-21T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Set Analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278057#M1187412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i have got it working, i can't use the same set analysis for the 2nd part as i need to divide it by ALL CHILLED sales regardless of any wastage or not. &lt;/P&gt;&lt;P&gt;Anyway i have it working now (my posted expression worked, the problem was i had a field selected which shouldnt have been)&lt;/P&gt;&lt;P&gt;I am affraid that the end user would get incorrect figures if they make the same mistake as i did.So how would i use the same expression but exclude the selections made on [Stock Movement Reason Code] on the 2nd part of the expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 12:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278057#M1187412</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2011-09-21T12:14:48Z</dc:date>
    </item>
    <item>
      <title>Set Analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278058#M1187413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; use below code&lt;/P&gt;&lt;P&gt;sum&amp;nbsp; ( {1&amp;lt;[Stock Movement Reason Code] ={3, 5}, Dept={'N'}&amp;gt;} StockValue)/Sum({$&amp;lt;Dept={'N'}&amp;gt;}SalesValue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 13:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-help/m-p/278058#M1187413</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-09-21T13:05:41Z</dc:date>
    </item>
  </channel>
</rss>

