<?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 Max Date and Max Day Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787270#M278484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a variable&amp;nbsp; for max(Day) and Max(Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dashboard and I have the current year sales figures &lt;/P&gt;&lt;P&gt;I also have last year sales figures I want to compare the two YTD so in my set analysis of the previous year I want to use a variable &lt;/P&gt;&lt;P&gt;to tell it to give me the sales figures for last year but only up until this years Max(Day)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the best way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes sense...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2015 08:21:20 GMT</pubDate>
    <dc:creator>rido1421</dc:creator>
    <dc:date>2015-01-14T08:21:20Z</dc:date>
    <item>
      <title>Max Date and Max Day Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787270#M278484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a variable&amp;nbsp; for max(Day) and Max(Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dashboard and I have the current year sales figures &lt;/P&gt;&lt;P&gt;I also have last year sales figures I want to compare the two YTD so in my set analysis of the previous year I want to use a variable &lt;/P&gt;&lt;P&gt;to tell it to give me the sales figures for last year but only up until this years Max(Day)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the best way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes sense...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787270#M278484</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-14T08:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date and Max Day Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787271#M278485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a variable vMaxDay as &lt;EM&gt;=max(Day)&lt;/EM&gt; and a variable vMaxYear as &lt;EM&gt;=max(Year).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use these variables in set analysis expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current: sum(Amount)&lt;/P&gt;&lt;P&gt;Previous year: sum({&amp;lt;Year={$(=vMaxYear-1)},Day={'&amp;lt;=$(=vMaxDay-1)'}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787271#M278485</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-01-14T09:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Max Date and Max Day Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787272#M278486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used =(Day(today()-1)) as my variable vCurrentDay and then used this in my set analysis&lt;/P&gt;&lt;P&gt;seems to work well... do you see any Issues I may have from doing it this way Gysbert?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 09:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-Date-and-Max-Day-Variable/m-p/787272#M278486</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-14T09:45:49Z</dc:date>
    </item>
  </channel>
</rss>

