<?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: Multiple Condition Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212138#M873190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(&lt;SPAN style="color: #ff0000;"&gt;ProductValueDate1-ProductValueDate3 &amp;lt;= 0&lt;/SPAN&gt;, RangeSum(ProductValueDate1, ProductValueDate2, -ProductValueDate3)/(DailyMktAvgProductTraded*(NetWorkDays([Date2-ProductEvent], [Date3-PeriodEnd])-1)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143272_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Nov 2016 15:07:06 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-11-08T15:07:06Z</dc:date>
    <item>
      <title>Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212135#M873187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All - I have a set analysis question that will probably sound more complicated than it is. I'm trying to create both a bar chart/pivot table that will show the amount of product traded, relative to the overall volume traded during a certain time period, but I'm having issues with my set analysis statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this world, a company partakes in an event where they can acquire more of a specific product at a discount (what I'll refer to as a "Product Event"). Other companies may also participate, and companies acquire many different types of products at various Product Events, not just one product in particular. Each company's inventory, or the amount of each product they own, is known, but only at specific dates in time. In the example attached, these dates are Nov 1, 2016, and Dec 1, 2016. What I want to do is - after a company partakes in one of these "Product Events" - figure out the amount that they sold relative to how much is Traded in the market (the volume). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, per the attached, for Product Event Z that occurred on Nov 25, 2016, I want to back out how much Company AAA sold of the amount they acquired on Nov 25, relative to the volume in the market in that time frame. I am only given a daily volume avg, so I need to multiply this by the amount of days between the Product Event and the Period End date (which is when the company will next report its inventory). So in this case, for Company AAA, I would have:&lt;/P&gt;&lt;P&gt;[100,000(Starting inventory) + 10,000 (Amount acquired in Product Event) - 105,000 (Ending inventory) ] / [10,000* (4 Business days from Nov 25, 2016 to Dec 1, 2016) = 12.5%. So 12.5% would be the amount shown on my bar graph for Company AAA, in addition to the other bars for other Companies for a given Product Event. What adds a layer of complication here is, I don't want to evaluate this expression when the Starting Balance + Amt acquired in Product Event is greater than the Ending Balance (since I would not be able to definitively back out how much was sold from the Product Event). So Company CCC would result in something like "-" or some way of distinguishing the expression can't be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a set analysis expression for the above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212135#M873187</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212136#M873188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure why wouldn't company CCC will be excluded here. If I go by your logic, I would essentially exclude all the rows here&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I don't want to evaluate this expression when the Starting Balance + Amt acquired in Product Event is greater than the Ending Balance. So Company CCC would result in something like "-" or some way of distinguishing the expression can't be evaluated.&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I look at all possible rows, I see that the Starting Balance + Amt Acquired is greater than the Ending Balance&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143226_Capture.PNG" style="height: 93px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;So, is your condition correct or am I missing something important here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do the calculations, assuming this is correct&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;[100,000(Starting inventory) + 10,000 (Amount acquired in Product Event) - 105,000 (Ending inventory) ] / [10,000* (4 Business days from Nov 25, 2016 to Dec 1, 2016) = 12.5%.&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I used this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(ProductValueDate1+ProductValueDate2 &amp;gt; ProductValueDate3, RangeSum(ProductValueDate1, ProductValueDate2, -ProductValueDate3)/(DailyMktAvgProductTraded*(NetWorkDays([Date2-ProductEvent], [Date3-PeriodEnd])-1)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Company&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ProductID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143227_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above may not be what you are looking to get, but I was not completely sure what you wanted. May be clarify the expected output a little bit and we might be able to help you better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 10:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212136#M873188</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-08T10:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212137#M873189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny. Sorry - that should have read that I want to exclude where the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Starting Balance (A) + Amt acquired in Product Event (B) - the Ending Balance (C) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;is greater than the Amt acquire in Product Event (B). &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;So A+B-C &amp;gt; B --&amp;gt; A-C&amp;gt;0. So CCC would thus be excluded. Thanks for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 13:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212137#M873189</guid>
      <dc:creator />
      <dc:date>2016-11-08T13:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212138#M873190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(&lt;SPAN style="color: #ff0000;"&gt;ProductValueDate1-ProductValueDate3 &amp;lt;= 0&lt;/SPAN&gt;, RangeSum(ProductValueDate1, ProductValueDate2, -ProductValueDate3)/(DailyMktAvgProductTraded*(NetWorkDays([Date2-ProductEvent], [Date3-PeriodEnd])-1)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143272_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212138#M873190</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-08T15:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212139#M873191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes thanks. What would it be if the ProductValues were stored in one column and the date was in another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 19:07:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212139#M873191</guid>
      <dc:creator />
      <dc:date>2016-11-08T19:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212140#M873192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to elaborate on what exactly are you changing here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 20:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212140#M873192</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-08T20:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Condition Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212141#M873193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, when you get a chance, can you follow me here so that I can send you a private message or you can send me a private message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 22:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Condition-Set-Analysis/m-p/1212141#M873193</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-08T22:52:31Z</dc:date>
    </item>
  </channel>
</rss>

