<?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 Date not resolving in Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086781#M361796</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 have expressions that contain set analysis. I am trying to get the expression to work in a variable but cannot get the date to resolve. If I copy the expression into the variable it work correctly, but, when I create the variable in the script, this is where it goes wrong. I would like the expression in the variable to be re-created at every reload. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that works in the chart is: &lt;/P&gt;&lt;P&gt;sum({&amp;lt;Source_Sort={'2'}, Date={"&amp;lt;=$(=date(MonthStart(Today(),0)-1))"}, [chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script I have tried the following, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET v_Due '&lt;SPAN style="font-size: 13.3333px;"&gt;sum({&amp;lt;Source_Sort={'2'}, Date={"&amp;lt;=$(=date(MonthStart(Today(),0)-1))"}, [chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT])&lt;/SPAN&gt;';&lt;/P&gt;&lt;P&gt;Looking at the variable in the front end the date is always "Date={'&amp;lt;='" instead of showing the date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried the following in the script: &lt;/P&gt;&lt;P&gt;LET v_Month_Close = "date(MonthStart(Today())-1,'YYYY MM DD')"; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;TABLE jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SET v_Due&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;=&lt;/TD&gt;&lt;TD&gt;sum({&amp;lt;Source_Sort={'2'}, Date={'&amp;lt;=$(=Date($(v_Month_Close)))'},[chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Still the date does not resolve. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advise in this regard will be appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Apr 2016 11:43:31 GMT</pubDate>
    <dc:creator>johngouws</dc:creator>
    <dc:date>2016-04-22T11:43:31Z</dc:date>
    <item>
      <title>Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086781#M361796</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 have expressions that contain set analysis. I am trying to get the expression to work in a variable but cannot get the date to resolve. If I copy the expression into the variable it work correctly, but, when I create the variable in the script, this is where it goes wrong. I would like the expression in the variable to be re-created at every reload. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that works in the chart is: &lt;/P&gt;&lt;P&gt;sum({&amp;lt;Source_Sort={'2'}, Date={"&amp;lt;=$(=date(MonthStart(Today(),0)-1))"}, [chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script I have tried the following, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET v_Due '&lt;SPAN style="font-size: 13.3333px;"&gt;sum({&amp;lt;Source_Sort={'2'}, Date={"&amp;lt;=$(=date(MonthStart(Today(),0)-1))"}, [chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT])&lt;/SPAN&gt;';&lt;/P&gt;&lt;P&gt;Looking at the variable in the front end the date is always "Date={'&amp;lt;='" instead of showing the date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried the following in the script: &lt;/P&gt;&lt;P&gt;LET v_Month_Close = "date(MonthStart(Today())-1,'YYYY MM DD')"; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then &lt;/P&gt;&lt;TABLE jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SET v_Due&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;=&lt;/TD&gt;&lt;TD&gt;sum({&amp;lt;Source_Sort={'2'}, Date={'&amp;lt;=$(=Date($(v_Month_Close)))'},[chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Still the date does not resolve. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advise in this regard will be appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 11:43:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086781#M361796</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2016-04-22T11:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086782#M361797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you try changing all the double quotes to single quotes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 11:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086782#M361797</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2016-04-22T11:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086783#M361798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;LET v_Month_Close = date(MonthStart(Today())-1,'YYYY MM DD');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 11:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086783#M361798</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-04-22T11:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086784#M361799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you are trying to do this, if the suggestions above doesn't work for you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086784#M361799</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-22T12:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086785#M361800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried: &lt;/P&gt;&lt;P&gt;LET v_Month_Close = date(MonthStart(Today())-1,'YYYY MM DD');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the expression: &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SET v_Due =&lt;/TD&gt;&lt;TD&gt;sum({&amp;lt;Source_Sort={'2'}, Date={'&amp;lt;=$(=Date($(v_Month_Close)))'},[tx chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the variable in the front end it still shows: &lt;/P&gt;&lt;P&gt;sum({&amp;lt;Source_Sort={'2'}, &lt;STRONG&gt;&lt;EM&gt;Date={'&amp;lt;='}&lt;/EM&gt;&lt;/STRONG&gt;,[tx chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for trying. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:22:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086785#M361800</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2016-04-22T12:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086786#M361801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be SO nice to share this monster, but it may take a while to break it down. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086786#M361801</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2016-04-22T12:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086787#M361802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LET v_Month_Close = Date(MonthStart(Today())-1,'YYYY MM DD');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;with the expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SET v_Due = &lt;/STRONG&gt;Sum({&amp;lt;Source_Sort={'2'}, Date={"&amp;lt;=$(v_Month_Close)"}, [tx chart id]={'1004','1021','1022'} &amp;gt;} [DUE AMOUNT]);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086787#M361802</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-22T12:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086788#M361803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple quotes and $-expansión can lead to this issues when creatin variables in script, can you try creating the variable like this?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;v_Due&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('sum({&amp;lt;Source_Sort={|2|}, Date={"&amp;lt;=%(=date(MonthStart(Today(),0)-1))"}, [chart id]={|1004|,|1021|,|1022|} &amp;gt;} [DUE AMOUNT])', '|', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39)), '%', '$'); &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086788#M361803</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-04-22T12:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date not resolving in Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086789#M361804</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;You are a genius! Thank you, it works perfectly. &lt;/P&gt;&lt;P&gt;This is going to resolve a major problem for me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 12:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-not-resolving-in-Variable/m-p/1086789#M361804</guid>
      <dc:creator>johngouws</dc:creator>
      <dc:date>2016-04-22T12:53:24Z</dc:date>
    </item>
  </channel>
</rss>

