<?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 Set Analysis and Aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr/m-p/227640#M79744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an expression that I use to calculate the max value of a balance from the last inputted value over a period of time that works perfectly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo])&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;However, what I need to add to this is to do this calculation for each site, i.e. Site A through to Site F. I was thinking of doing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;(firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Site] = {'Site'},[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo])) +&lt;BR /&gt;(firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Site] = {'Site2'},[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo]))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;But this doesn't work, infact, only specifying one site doesnt work.. After looking on the forums, I saw that someone had a similiar issue where Aggr and set analysis doesnt work.&lt;/P&gt;&lt;P&gt;If anyone has any other ideas on how I can perform this calculation for multiple sites, it would be appreciated!!!&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Dayna Litherland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2010 11:08:27 GMT</pubDate>
    <dc:creator>Dayna</dc:creator>
    <dc:date>2010-02-01T11:08:27Z</dc:date>
    <item>
      <title>Set Analysis and Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr/m-p/227640#M79744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an expression that I use to calculate the max value of a balance from the last inputted value over a period of time that works perfectly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo])&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;However, what I need to add to this is to do this calculation for each site, i.e. Site A through to Site F. I was thinking of doing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;(firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Site] = {'Site'},[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo])) +&lt;BR /&gt;(firstsortedvalue(DISTINCT aggr(min({&amp;lt;[BOM Chart - Site] = {'Site2'},[BOM Chart - Date] = {"&amp;lt;=$(=date(only(today())+91))&amp;gt;=$(=date(only(today())-91))"}&amp;gt;} [BOM Chart - Balance]),[BOM Chart - Timescale],[BOM Chart - AutoNo]),-[BOM Chart - AutoNo]))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;But this doesn't work, infact, only specifying one site doesnt work.. After looking on the forums, I saw that someone had a similiar issue where Aggr and set analysis doesnt work.&lt;/P&gt;&lt;P&gt;If anyone has any other ideas on how I can perform this calculation for multiple sites, it would be appreciated!!!&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Dayna Litherland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 11:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-Aggr/m-p/227640#M79744</guid>
      <dc:creator>Dayna</dc:creator>
      <dc:date>2010-02-01T11:08:27Z</dc:date>
    </item>
  </channel>
</rss>

