<?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: Dates in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789284#M1044784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think this given me the max value for a defined month. The issue is I want a variabel month value to be used in the set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Nov 2014 08:21:43 GMT</pubDate>
    <dc:creator>Karl_Hart</dc:creator>
    <dc:date>2014-11-21T08:21:43Z</dc:date>
    <item>
      <title>Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789279#M1044776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I work in Housing and our tenants rent balance gets updated on a weekly basis. I want to find out the maximum balance for the rent account in a given month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we will have &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Balance&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; £50&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; £100&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; £150&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Apr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; £0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in this example. I want to see the answer of £150&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max(aggr(sum([Rent Balance]), TenancyID, IndexDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems to give me the correct answer if I select the month I want manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am looking to see what the balance is 3 months after an assessment date (which differs for each Tenant) so I know I need to add some set analysis along the lines of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;Month=(AddMonths([Assesment Date],3))&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out with the syntax?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 13:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789279#M1044776</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2014-11-20T13:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789280#M1044777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;{&amp;lt;Month = {'$(=AddMonths( [Assesment Date], 3) ) '}&amp;gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 13:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789280#M1044777</guid>
      <dc:creator>mato32188</dc:creator>
      <dc:date>2014-11-20T13:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789281#M1044778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin, but that is just returning null values....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 13:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789281#M1044778</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2014-11-20T13:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789282#M1044780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karl,&lt;/P&gt;&lt;P&gt; Set analysis is calculated for the whole table, not row by row, you can set:&lt;/P&gt;&lt;P&gt;{&amp;lt;Month={'$(=Month(AddMonths(Max([Assesment Date]), 3)))'}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this returns 'Apr', set analysis will apply as Month={'Apr'} for all the rows, no matter what [Assesment Date] has a particular row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 13:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789282#M1044780</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-20T13:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789283#M1044782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way to do that is using the firstsortedvalue function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsortedvalue(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Rent Balance],-Aggr(Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IndexDate), &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TenancyID))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if using the correct fields name, but see this functions to solve your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2014 13:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789283#M1044782</guid>
      <dc:creator>jolivares</dc:creator>
      <dc:date>2014-11-20T13:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789284#M1044784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think this given me the max value for a defined month. The issue is I want a variabel month value to be used in the set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 08:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789284#M1044784</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2014-11-21T08:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789285#M1044786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info. I was hoping that you could apply set analysis on a row by row basis, but sadly you say I cant. I'll have to think of a work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incidentally, the formula you gave above is doing as you say, giving the max value for a set month, (Jan 14 in this case) I just cant see where that month has come from. Nevermind, I need to look for a different solution.&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>Fri, 21 Nov 2014 08:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Set-Analysis/m-p/789285#M1044786</guid>
      <dc:creator>Karl_Hart</dc:creator>
      <dc:date>2014-11-21T08:37:14Z</dc:date>
    </item>
  </channel>
</rss>

