<?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 Week variable not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588140#M738268</link>
    <description>&lt;P&gt;I created this variable on the script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;LET vLastSaturday = date(date#(weekstart(today()),'yyyy/mm/dd'),'yyyy-mm-dd');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then on my data, I want to pull only sales that are before the variable date, so my where clause looks like this:&lt;/P&gt;&lt;P&gt;where&amp;nbsp; cast( [POLICY_CREATE_DATE] as date) &amp;lt; $(vLastSaturday)&lt;/P&gt;&lt;P&gt;The original POLICY_CREATE_DATE format is datetime so I'm formating it to yyyy-mm-dd so that it's the same as my variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I reload the data, it gives me Operand type clash error. Please see attached screenshot and assist.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>nkosinde13</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Week variable not working</title>
      <link>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588140#M738268</link>
      <description>&lt;P&gt;I created this variable on the script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;LET vLastSaturday = date(date#(weekstart(today()),'yyyy/mm/dd'),'yyyy-mm-dd');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then on my data, I want to pull only sales that are before the variable date, so my where clause looks like this:&lt;/P&gt;&lt;P&gt;where&amp;nbsp; cast( [POLICY_CREATE_DATE] as date) &amp;lt; $(vLastSaturday)&lt;/P&gt;&lt;P&gt;The original POLICY_CREATE_DATE format is datetime so I'm formating it to yyyy-mm-dd so that it's the same as my variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I reload the data, it gives me Operand type clash error. Please see attached screenshot and assist.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588140#M738268</guid>
      <dc:creator>nkosinde13</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Week variable not working</title>
      <link>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588147#M738269</link>
      <description>&lt;P&gt;You need quotes:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where&amp;nbsp; cast( [POLICY_CREATE_DATE] as date) &amp;lt; '$(vLastSaturday)';&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 12:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588147#M738269</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-06-04T12:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Week variable not working</title>
      <link>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588916#M738270</link>
      <description>&lt;P&gt;Thank you, your solution worked.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 10:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Week-variable-not-working/m-p/1588916#M738270</guid>
      <dc:creator>nkosinde13</dc:creator>
      <dc:date>2019-06-06T10:07:24Z</dc:date>
    </item>
  </channel>
</rss>

