<?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: Problem with Date and AddDate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072074#M1294581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes the smallest rock makes the door impossible to open &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continue with your good work and have a nice job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jan 2016 17:32:34 GMT</pubDate>
    <dc:creator>miguelbraga</dc:creator>
    <dc:date>2016-01-12T17:32:34Z</dc:date>
    <item>
      <title>Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072069#M1294569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been having a problem with a formula in set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;/P&gt;&lt;P&gt;if([Payment Type ID] = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,sum({&amp;lt; [Calendar Year Month ID] =&amp;nbsp; {'$(=max([Calendar Year Month ID]))'}, [Payment Type ID] = {1}, [Calendar Date]=&amp;nbsp; {'&amp;lt;$(=date(today(0)-4))'}&amp;gt;}&amp;nbsp; _f_OK_POSITIVE_TRX)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,sum({&amp;lt; [Calendar Year Month ID] =&amp;nbsp; {'$(=max([Calendar Year Month ID])-1)'},[Payment Type ID] = {2},[Calendar Date]=&amp;nbsp; {'&amp;lt;$(=date(AddMonths(today(0)-4,-1))'}&amp;gt;}&amp;nbsp; _f_OK_POSITIVE_TRX)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;,[Merchant ID], [Payment Type ID],[Calendar Date]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason this part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(AddMonths(today()-4,-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works in a text box, but when I use it the set analysis it doesn't. Is there anything I'm missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072069#M1294569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072070#M1294571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's hard to answer with the information provided. In general&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Check that the dollar sign expansion returns a date value with the same format as the field you are modifying ([Calendar Date]).&lt;/P&gt;&lt;P&gt;- If you remove the expression label in a straight table chart, you can hover over the label and see the expanded expression, to check that all dollar sign expansions work as intended&lt;/P&gt;&lt;P&gt;- Check that there are values for your field modifier search to return (i.e. Calendar Dates before the expanded date).&lt;/P&gt;&lt;P&gt;- Also check that potential user selections or other field modifier don't render the set incompatible (e.g. check the field modifications for Calendar Year Month ID is compatible to your Calendar Date selection and all possible user selections in calendar fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see, multiple possible causes why the expression might not work. It's often much easier to help if you could post&amp;nbsp; a small sample QVW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072070#M1294571</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-12T13:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072071#M1294573</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;Replace this $(=date(AddMonths(today(0)-4,-1)) with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = AddMonths(Date(today(0))-4,-1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 15:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072071#M1294573</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2016-01-12T15:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072072#M1294576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where you have this:&lt;/P&gt;&lt;P&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;STRONG&gt;{'&amp;lt;$(=date(AddMonths(today(0)-4,-1))'}&lt;/STRONG&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;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&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;Change to this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;{'&amp;lt;$(=date(AddMonths(today&lt;STRONG&gt;()&lt;/STRONG&gt;-4,-1))'}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If don't work, report and/or elaborate your question better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 15:20:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072072#M1294576</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2016-01-12T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072073#M1294579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone thanks for your help. I can't beleive I was banging my head for so long. It was just an extra parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Calendar Date] = {'&amp;lt;$(=date(AddMonths(today(0)-4,-1)))'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 16:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072073#M1294579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-12T16:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Date and AddDate</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072074#M1294581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes the smallest rock makes the door impossible to open &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continue with your good work and have a nice job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 17:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Date-and-AddDate/m-p/1072074#M1294581</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2016-01-12T17:32:34Z</dc:date>
    </item>
  </channel>
</rss>

