<?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: Set analysis issues when using date variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710601#M1055155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I suggests also to try showing your Variables in text box to compare your actual variable value to what is really your expected value from your Table.This is how i usually debug my formulas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 11:48:46 GMT</pubDate>
    <dc:creator>jpenuliar</dc:creator>
    <dc:date>2014-10-28T11:48:46Z</dc:date>
    <item>
      <title>Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710586#M1055140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pushing this barrow again.&amp;nbsp; I have the below set analysis counting like instances under "CustID" over various months.&amp;nbsp; I have set up variables vThisMonth(01/09/2014) and vLastMonth (01/08/2014) to do pretty much as is stated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used these variables in "where" statements and all working ok.&amp;nbsp; However, in the below set analysis it just won't recognise the dates.&amp;nbsp; I've tried the below formats (as per suggestions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Formula&lt;/STRONG&gt;&lt;BR /&gt;=count({&amp;lt;Date={"$(=vThisMonth)"},CustID=P({&amp;lt;Date={"$(=vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;Result&lt;/STRONG&gt;&lt;BR /&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Formula&lt;/STRONG&gt;&lt;BR /&gt;=count({&amp;lt;Date={"$(vThisMonth)"},CustID=P({&amp;lt;Date={"$(vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;BR /&gt;Result&lt;BR /&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Formula&lt;/STRONG&gt;&lt;BR /&gt;=count({&amp;lt;Date={"=$(=vThisMonth)"},CustID=P({&amp;lt;Date={"=$(=vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;40095 (which happens to be every instance, non-distinct)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Formula&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;=count({&amp;lt;Date={"=$(=vThisMonth)"},CustID=P({&amp;lt;Date={"=$(=vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;Result&lt;/STRONG&gt;&lt;BR /&gt;40095 (which happens to be every instance, non-distinct)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The only way I can get this to work is to manually add the date&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Formula&lt;/STRONG&gt;&lt;BR /&gt;=count({&amp;lt;Date={"01/09/2014"},CustID=P({&amp;lt;Date={"01/08/2014"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;BR /&gt;Result&lt;BR /&gt;24 (Correct)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!!&amp;nbsp; This is doing my head in!!&amp;nbsp; Thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 10:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710586#M1055140</guid>
      <dc:creator />
      <dc:date>2014-10-28T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710587#M1055141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you define vLastMonth and vThisMonth preceeded with an equal sign?&lt;/P&gt;&lt;P&gt;since your dates are formatted then do not use the $ in your set analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 10:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710587#M1055141</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-10-28T10:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710588#M1055142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ali&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1}{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"vThisMonth"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},CustID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"vLastMonth"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}CustID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;}CustID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Result was still 0&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710588#M1055142</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710589#M1055143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest that you transform your date fields into numbers&lt;/P&gt;&lt;P&gt;num(DayStart(date_field)) &lt;/P&gt;&lt;P&gt;then repeat your expression with $ and see&lt;/P&gt;&lt;P&gt;one more thing you need to define the vLastMonth and vThisMonth with an "=' in the beginning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710589#M1055143</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-10-28T11:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710590#M1055144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'courier new', courier;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #0000ff;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;({1}{&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800000;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800000;"&gt;"$(vThisMonth)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;},CustID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #0000ff;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800000;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #800000;"&gt;"$(vLastMonth)"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;}&amp;gt;}CustID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;)&amp;gt;}CustID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'courier new', courier; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;Simple text substitution before the set is calculated. Note that both these variables should contain a correct date, either numeric (e.g. 45678) or formatted ("1/09/2014")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 10pt; font-family: 'courier new', courier; font-weight: inherit;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710590#M1055144</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-28T11:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710591#M1055145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter.&amp;nbsp; Yep, tried that one too.&amp;nbsp; Still result=0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710591#M1055145</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710592#M1055146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Date#(count({&amp;lt;Date={"=$(=vThisMonth)"},CustID=P({&amp;lt;Date={"=$(=vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID))&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;=num#(count({&amp;lt;Date={"=$(=vThisMonth)"},CustID=P({&amp;lt;Date={"=$(=vLastMonth)"}&amp;gt;}CustID)&amp;gt;}CustID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710592#M1055146</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710593#M1055147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Date={"$(=Date(vThisMonth,'DD/MM/YYYY'))"},CustID=P({&amp;lt;Date={"$(=Date(vLastMonth,'DD/MM/YYYY'))"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:15:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710593#M1055147</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-28T11:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710594#M1055148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rakesh, both got more than 0, a lot more.&amp;nbsp; Unfotunately counted every line again (result=40095)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710594#M1055148</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710595#M1055149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your document; open Settings-&amp;gt;Variable Overview and scroll down until you see the two culprits. What is their current value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710595#M1055149</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-10-28T11:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710596#M1055150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately back to 0 with this one.&amp;nbsp; Thanks Simen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710596#M1055150</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710597#M1055151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then this is a Data-problem, and not a Set analysis problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That expressions does exactly what you ask when I test it myself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you define your variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710597#M1055151</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-28T11:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710598#M1055152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vThisMonth = 01/09/2014&lt;/P&gt;&lt;P&gt;vLastMonth = 01/08/2014&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710598#M1055152</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710599#M1055153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt;&lt;SPAN style="color: #575757;"&gt;SET &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;vThisMonth &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;= MakeDate(2014, NUM(Month(Today())-1,'00'),01); &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;//Report Month&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;SET&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;vLastMonth&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; = MakeDate(2014, NUM(Month(Today())-2,'00'),01); &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;//Previous Report Month&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:29:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710599#M1055153</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710600#M1055154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try changing it to&lt;/P&gt;&lt;P&gt;let vThisMonth = MonthStart(Today()-1);&lt;/P&gt;&lt;P&gt;let vLastMonth = MonthStart(Addmonths(Today()-1,-1));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using LET, the variable will have a value when you reload the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this does not work i would use &lt;/P&gt;&lt;P&gt;let vThisMonth = Floor(MonthStart(Today()-1)));&lt;/P&gt;&lt;P&gt;let vLastMonth = Floor(MonthStart(Addmonths(Today()-1,-1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that doesnt work, then would you mind pasting a value from your Date field? Do you perhaps use a timestamp in your Date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710600#M1055154</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-28T11:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710601#M1055155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I suggests also to try showing your Variables in text box to compare your actual variable value to what is really your expected value from your Table.This is how i usually debug my formulas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710601#M1055155</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2014-10-28T11:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710602#M1055156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I trid that Simen.&amp;nbsp; However caused too many problems with other setups, scripts etc.&amp;nbsp; I had to change back to original.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above value I entered are the Autogen results.&amp;nbsp; so variables have those dates in that format (DD/MM/YYYY).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source date date is as below (from table view preview)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="date.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/69849_date.JPG" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710602#M1055156</guid>
      <dc:creator />
      <dc:date>2014-10-28T11:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710603#M1055157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Date={"$(=$(vThisMonth))"},CustID=P({&amp;lt;Date={"$(=$(vLastMonth))"}&amp;gt;}CustID)&amp;gt;}CustID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 12:06:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710603#M1055157</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-28T12:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issues when using date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710604#M1055158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You Simen, are a legend, that worked prefectly!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks mate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To all others, thanks for your help as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 12:10:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issues-when-using-date-variables/m-p/710604#M1055158</guid>
      <dc:creator />
      <dc:date>2014-10-28T12:10:48Z</dc:date>
    </item>
  </channel>
</rss>

