<?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 function with different rules for different variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-function-with-different-rules-for-different/m-p/1147933#M913748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be able to achieve this using the Aggr() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(vDateMin1)&amp;lt;=$(vDateMax1)"}&amp;gt;} [Order Cost]) * &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(vDateMin2)&amp;lt;=$(vDateMax2)"}&amp;gt;} [Order Qty]), &lt;SPAN style="color: #ff0000;"&gt;[Order ID]&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am assuming that Order ID is the most granular level in your database. Replace it with what you have in your database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2016 10:52:25 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-26T10:52:25Z</dc:date>
    <item>
      <title>Set analysis function with different rules for different variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-function-with-different-rules-for-different/m-p/1147932#M913747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a questions regarding 'Set Analysis' of Qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have in my database:&lt;/P&gt;&lt;P&gt;1) a list of part prices - &lt;SPAN style="font-size: 13.3333px;"&gt;[Order Cost]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2) a list of part quantity - &lt;SPAN style="font-size: 13.3333px;"&gt;[Order Qty]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3) a list of dates for when the part was purchased - &lt;SPAN style="font-size: 13.3333px;"&gt;[Order Date]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;4) 4 User defined Dates: &lt;SPAN style="font-size: 13.3333px;"&gt;vDateMin1, &lt;SPAN style="font-size: 13.3333px;"&gt;vDateMin2, &lt;SPAN style="font-size: 13.3333px;"&gt;vDateMax1, &lt;SPAN style="font-size: 13.3333px;"&gt;vDateMax2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do price of part - based on the date range via Set Analysis:&lt;/P&gt;&lt;P&gt;Achieved via: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;[Order Date]={"&amp;gt;=$(vDateMin1)&amp;lt;=$(vDateMax1)"}&amp;gt;}[Order Cost]*[Order Qty])&lt;/P&gt;&lt;P&gt;which returned very well the cost of the Part across a set date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm interested to know if Qlik has the function to set a range of date for [Order Cost] and a different range of date for [Order Qty], and multiply by each other,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Ie: set [Order Cost] with the condition of within&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vDateMin1, &lt;SPAN style="font-size: 13.3333px;"&gt;vDateMax1; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and [Order Qty] with a different condition &lt;SPAN style="font-size: 13.3333px;"&gt;of within&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vDateMin2, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vDateMax2&lt;/SPAN&gt;&lt;/SPAN&gt;&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/Set-analysis-function-with-different-rules-for-different/m-p/1147932#M913747</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis function with different rules for different variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-function-with-different-rules-for-different/m-p/1147933#M913748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be able to achieve this using the Aggr() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(vDateMin1)&amp;lt;=$(vDateMax1)"}&amp;gt;} [Order Cost]) * &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[Order Date]={"&amp;gt;=$(vDateMin2)&amp;lt;=$(vDateMax2)"}&amp;gt;} [Order Qty]), &lt;SPAN style="color: #ff0000;"&gt;[Order ID]&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am assuming that Order ID is the most granular level in your database. Replace it with what you have in your database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 10:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-function-with-different-rules-for-different/m-p/1147933#M913748</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-26T10:52:25Z</dc:date>
    </item>
  </channel>
</rss>

