<?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: Date Criteria in Expression / Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273348#M849197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).&lt;/P&gt;&lt;P&gt;If not, please make clear what part of this topic you still need help with &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Mar 2017 10:06:14 GMT</pubDate>
    <dc:creator>oknotsen</dc:creator>
    <dc:date>2017-03-12T10:06:14Z</dc:date>
    <item>
      <title>Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273341#M849190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought I had started to understand the use of date formats in Qlikview, but this has me stumped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does this work in a chart expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[NU]={'New'},[Sale Type]={'Retail'},DataType={'Budget'},InvMonthYear={'Mar-17'}&amp;gt;}[Retail Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where InvMonthYear is Date(makedate(mid([Invoice Date],7,4),mid([Invoice Date],4,2),1),'MMM-YY') as [InvMonthYear]&amp;nbsp; when created in the LOAD script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[NU]={'New'},[Sale Type]={'Retail'},DataType={'Budget'},InvMonthYear={$(vActualMonthYear)}&amp;gt;}[Retail Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vActualMonthYear is a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vActualMonthYear = Date(MonthStart(today()),'MMM-YY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance much appreciated&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/Date-Criteria-in-Expression-Set-Analysis/m-p/1273341#M849190</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273342#M849191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vActualMonthYear = Date(&lt;STRONG&gt;floor&lt;/STRONG&gt;(MonthStart(today())&lt;STRONG&gt;)&lt;/STRONG&gt;,'MMM-YY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because Monthstart() returned a timestamp and not a date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 17:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273342#M849191</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-03-11T17:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273343#M849192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim, I think your expression needs an '=' in variable or in dollar-expansion, and simple quotes in set analysis:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({&amp;lt;[NU]={'New'},[Sale Type]={'Retail'},DataType={'Budget'},InvMonthYear={&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;$(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;vActualMonthYear)&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;}[Retail Units])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;or the '=' can be set in variable (simple quotes in set analysis are still needed):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SET vActualMonthYear = &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;Date(MonthStart(today()),'MMM-YY');&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 18:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273343#M849192</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-03-11T18:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273344#M849193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting this variable in a textbox and see what value is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'$(=&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 28.6924px;"&gt;vActualMonthYear)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 19:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273344#M849193</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2017-03-11T19:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273345#M849194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you that worked. Not sure I quite understand why at the moment, but I'll just accept the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 20:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273345#M849194</guid>
      <dc:creator />
      <dc:date>2017-03-11T20:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273346#M849195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried all those sorts of things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What also confused me was I tried the if else condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(InvMonthYear=$(vActualMonthYear),1,0) in a list box and it produced the result of 1 when the InvMonthYear field was Mar-17 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I assumed this should work in a set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 20:54:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273346#M849195</guid>
      <dc:creator />
      <dc:date>2017-03-11T20:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273347#M849196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll give that a go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Never seen floor used in relation to dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Mar 2017 20:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273347#M849196</guid>
      <dc:creator />
      <dc:date>2017-03-11T20:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273348#M849197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).&lt;/P&gt;&lt;P&gt;If not, please make clear what part of this topic you still need help with &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Mar 2017 10:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273348#M849197</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2017-03-12T10:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273349#M849198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim, trying to explain... We want &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;InvMonthYear={'Mar-17'}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we don't set the simple quotes we only get:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;InvMonthYear={Mar-17} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;This syntaxis seems is telling: "substract 17 from the field Mar", so we need the single quotes to look for the string 'Mar-17'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If we don't set an equal the variable expression is not evaluated, it's just a text, it will be expanded as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;InvMonthYear={'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(MonthStart(today()),'MMM-YY')&lt;/SPAN&gt;'}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Wich can't be evaluated. Adding an equal sign before it's telling to evalue the expression and after that pass the result to the $-expansion&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Mar 2017 21:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273349#M849198</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-03-12T21:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date Criteria in Expression / Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273350#M849199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case it's expanded as:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(InvMonthYear=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(MonthStart(today()),'MMM-YY')&lt;/SPAN&gt;,1,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a correct expression that can work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Mar 2017 21:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Criteria-in-Expression-Set-Analysis/m-p/1273350#M849199</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-03-12T21:20:44Z</dc:date>
    </item>
  </channel>
</rss>

