<?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: Num = Month comparison bug? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36191#M608294</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;i tried your formula&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;a&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;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),-1),'MM');&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;trace&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(a)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;exit&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;script&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and the result is 02 (not 2 as in your text box) whiwh is logical according to the format used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;just a question : did you use it last month , when the result was 01 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Mar 2018 15:32:56 GMT</pubDate>
    <dc:creator>olivierrobin</dc:creator>
    <dc:date>2018-03-30T15:32:56Z</dc:date>
    <item>
      <title>Num = Month comparison bug?</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36190#M608293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a little bit confused about this issue, which occurs suddenly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since 1 month I'm working with my qlikview application and today, after a routine load the following expression doesn't work anymore:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;SUM({1&amp;lt;DATATYPE={'&lt;STRONG style="font-size: 8pt;"&gt;ACTUAL&lt;/STRONG&gt;'},BILL_YEAR={"$(=date(addmonths(today(),-1),'YYYY'))"},BILL_MONTH={"$(=date(addmonths(today(),-1),'MM'))"}&amp;gt;}AMOUNT)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is within the set analysis - condition: &lt;STRONG style="font-size: 8pt;"&gt;BILL_MONTH={"$(=date(addmonths(today(),-1),'MM'))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;IMG alt="months.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/198033_months.JPG" style="height: auto;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That's how qlik depicts the values of the field in a filter-box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first approach was to change the datatype in the scrip like these:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;NUM(BILL_MONTH,'00') AS BILL_MONTH,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;NUM(BILL_MONTH,'0') AS BILL_MONTH, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;NUM(BILL_MONTH) AS BILL_MONTH, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;DATE(BILL_MONTH,'MM') AS BILL_MONTH,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;No one of these above fixed the issue. Just one thing helped: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Changing this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;SUM({1&amp;lt;DATATYPE={'ACTUAL'},BILL_YEAR={"$(=date(addmonths(today(),-1),'YYYY'))"},BILL_MONTH={"$(=date(addmonths(today(),-1),'MM'))"}&amp;gt;}AMOUNT)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;into that &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;SUM({1&amp;lt;DATATYPE={'ACTUAL'},BILL_YEAR={"$(=date(addmonths(today(),-1),'YYYY'))"},BILL_MONTH={"$(=date(addmonths(today(),-1),'&lt;SPAN style="color: #ff0000;"&gt;M'&lt;/SPAN&gt;))"}&amp;gt;}AMOUNT)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;After that all formulas were calculated correctly. But I absolutely do not want to change each formula in my application especially because there was no obvious change. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Which format opportunities do I still have?&amp;nbsp; Any ideas? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you in advance!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36190#M608293</guid>
      <dc:creator>spcon2016</dc:creator>
      <dc:date>2018-03-30T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Num = Month comparison bug?</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36191#M608294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;i tried your formula&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;a&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;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;addmonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),-1),'MM');&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;trace&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(a)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;exit&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;script&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and the result is 02 (not 2 as in your text box) whiwh is logical according to the format used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;just a question : did you use it last month , when the result was 01 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 15:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36191#M608294</guid>
      <dc:creator>olivierrobin</dc:creator>
      <dc:date>2018-03-30T15:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Num = Month comparison bug?</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36192#M608295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;BILL_MONTH={"$(=date(addmonths(today(),-1),'M'))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 16:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36192#M608295</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2018-03-30T16:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Num = Month comparison bug?</title>
      <link>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36193#M608296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, it has worked until yesterday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I tried to build up the formula with if-condition. Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BILL_MONTH is defined as NUM(BILL_MONTH, '00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one doesn't work:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM(if(DATATYPE = 'ACTUAL' AND BILL_YEAR=date(addmonths(today(),-1),'YYYY') AND BILL_MONTH = date(addmonths(today(),-1),'MM')&amp;nbsp; ,REVENUE))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one does:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM(if(DATATYPE = 'ACTUAL' AND BILL_YEAR=&lt;SPAN style="text-decoration: underline;"&gt;year&lt;/SPAN&gt;(date(addmonths(today(),-1),'YYYY')) AND BILL_MONTH = &lt;SPAN style="text-decoration: underline;"&gt;month&lt;/SPAN&gt;(date(addmonths(today(),-1),'MM')&amp;nbsp; ,REVENUE)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That's strange! I didn't need to transform into year or month before. Am I able to prepare the data within the script-editor to avoid the additional year and month statements? &lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 22:05:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-Month-comparison-bug/m-p/36193#M608296</guid>
      <dc:creator>spcon2016</dc:creator>
      <dc:date>2018-03-30T22:05:20Z</dc:date>
    </item>
  </channel>
</rss>

