<?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 invoice date in a set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215426#M68890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a datamart with invoice dates. My actual max invoice date is &lt;B&gt;15/01/2010.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I would like to obtain sales amount for the max date above, which would be unchanged whatever my selections are:&lt;/P&gt;&lt;P&gt;for example if i select year 2009, it will give me sales amount for 15/01/2010 anyway.&lt;/P&gt;&lt;P&gt;i tried this but it's not working and i can not figure out why :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[INVOICE DATE]={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}&amp;gt;}[SALES AMT])&lt;/P&gt;&lt;P&gt;where vDatemax=max([INVOICE DATE])&lt;/P&gt;&lt;P&gt;and vTodaysDate=num(Today())&lt;/P&gt;&lt;P&gt;when i select year 2010 all is ok, but when i select 2009 or 2008, the answer is 0.&lt;/P&gt;&lt;P&gt;thx a lot for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jan 2010 16:25:31 GMT</pubDate>
    <dc:creator>alex59800</dc:creator>
    <dc:date>2010-01-18T16:25:31Z</dc:date>
    <item>
      <title>Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215426#M68890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a datamart with invoice dates. My actual max invoice date is &lt;B&gt;15/01/2010.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I would like to obtain sales amount for the max date above, which would be unchanged whatever my selections are:&lt;/P&gt;&lt;P&gt;for example if i select year 2009, it will give me sales amount for 15/01/2010 anyway.&lt;/P&gt;&lt;P&gt;i tried this but it's not working and i can not figure out why :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;[INVOICE DATE]={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}&amp;gt;}[SALES AMT])&lt;/P&gt;&lt;P&gt;where vDatemax=max([INVOICE DATE])&lt;/P&gt;&lt;P&gt;and vTodaysDate=num(Today())&lt;/P&gt;&lt;P&gt;when i select year 2010 all is ok, but when i select 2009 or 2008, the answer is 0.&lt;/P&gt;&lt;P&gt;thx a lot for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215426#M68890</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2010-01-18T16:25:31Z</dc:date>
    </item>
    <item>
      <title>Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215427#M68891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to ignore the selection on year. When you select 2009 or 2008, you are telling QlikView to pull values where the year is 2009 (the selection) and the year is 2010 (from your Today's Date variable), which can obviously never happen.&lt;/P&gt;&lt;P&gt;Try using the 1 in your Set Analysis instead of $:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({1&amp;lt;[INVOICE DATE]={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}&amp;gt;}[SALES AMT])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;EDIT: Do you really need the Year in your Set Analysis expression? You're already pulling for the Max of Invoice Date, so that should give you 15/01/2010. Try it without the Year and see if that works.&lt;/P&gt;&lt;P&gt;The reason I ask is, because using the 1 instead of the $ will ignore all selections. If you'd simply like to ignore the Year selection, you can use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({$&amp;lt;[INVOICE DATE]={'$(vDatemax)'}, YEAR=&amp;gt;}SALES AMT])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215427#M68891</guid>
      <dc:creator />
      <dc:date>2010-01-18T16:32:09Z</dc:date>
    </item>
    <item>
      <title>Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215428#M68892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;[INVOICE DATE]={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}&amp;gt;}[SALES AMT])&lt;/P&gt;&lt;P&gt;Nimish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215428#M68892</guid>
      <dc:creator />
      <dc:date>2010-01-18T16:35:17Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215429#M68893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi first of all thanks a lot for your prompt answer,&lt;/P&gt;&lt;P&gt;first expression does not work, it results in a 0 answer when i select year 2009 or 2008, i would like the answer to be unchanged whatever the year selection is (15/01/2010 sales amiunt is 25 300€)&lt;/P&gt;&lt;P&gt;second expression either, it results in giving me the sales amount for max date of 2009 or 2008 when i select those years, and i would like to have 15/01/2010 sales amount unchanged.&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215429#M68893</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2010-01-18T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215430#M68894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be the problem is coming from my variables ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215430#M68894</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2010-01-18T16:49:35Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215431#M68895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({$&amp;lt;[INVOICE DATE]+={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}&amp;gt;}[SALES AMT])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;Note the "+=" operator instead of "=". &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 16:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215431#M68895</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-01-18T16:54:42Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215432#M68896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ni&lt;/P&gt;&lt;P&gt;Not working either&lt;/P&gt;&lt;P&gt;i get sales amount for full year 2010, not for specific max invoice date 15/01/2010.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 17:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215432#M68896</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2010-01-18T17:04:15Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215433#M68897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way to check is to create a chart and use your Set Analysis expression, but don't give it a label. Then, when the chart is rendered, the label will be your expression with your dollar sign expansions evaluated. That should show you what your variable is returning.&lt;/P&gt;&lt;P&gt;I thought you said your original expression was working if you selected 2010. The expression I gave is a simple substitution; if you're getting results with the $, you should get those results and more with the 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 17:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215433#M68897</guid>
      <dc:creator />
      <dc:date>2010-01-18T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215434#M68898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give a try to (untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({$ + 1&amp;lt; [INVOICE DATE] = {"$(vDatemax)"} &amp;gt;} [SALES AMT])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 17:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215434#M68898</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-01-18T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215435#M68899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;not working either, return me sales for all invoice dates &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 18:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215435#M68899</guid>
      <dc:creator>alex59800</dc:creator>
      <dc:date>2010-01-18T18:07:48Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Max invoice date in a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215436#M68900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does your expression look like when the dollar sign expansion is evaluated? Have you created a working expression with the max invoice date explicitly entered?&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({1&amp;lt;[INVOICE DATE]={'15/01/2010'}&amp;gt;}[SALES AMT])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Does the above expression work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 18:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-invoice-date-in-a-set-analysis-expression/m-p/215436#M68900</guid>
      <dc:creator />
      <dc:date>2010-01-18T18:23:36Z</dc:date>
    </item>
  </channel>
</rss>

