<?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 Strainge behaving of Dual() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24227#M3978</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;I'm struggling with functions related with Date.&lt;/P&gt;&lt;P&gt;Following test script tries to create tables Master Calender(Temp_Cal) and User Calendar(MMYYYY_tets).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believed [User Calender] returns ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MMYYY | MMYYY_dual_test&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;01-2019 | 2019&lt;/P&gt;&lt;P&gt;02-2019 | 2019&lt;/P&gt;&lt;P&gt;03-2019 | 2019&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but [User Calender] preview shows ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MMYYY | MMYYY_dual_test&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;01-2019 | 2018&lt;/P&gt;&lt;P&gt;02-2019 | 2018&lt;/P&gt;&lt;P&gt;03-2019 | 2018&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I set dual value as so, but I think table preview shows "Real value".&lt;/P&gt;&lt;P&gt;Does anyone know why Table Preview returns such value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------- Test script -------------------&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;Set FirstMonthOfYear = 4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Master Calendar&lt;/P&gt;&lt;P&gt;Temp_Cal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varDateMin_Num&amp;nbsp; = Num(Date#('01-04-2018', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;LET varDateMax_Num&amp;nbsp; = Num(Date#('31-03-2019', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date($(varDateMin_Num) + rowno() - 1) AS Temp_Date&lt;/P&gt;&lt;P&gt;AutoGenerate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(varDateMax_Num) - $(varDateMin_Num) + 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// User Calendar&lt;/P&gt;&lt;P&gt;MMYYYY_test:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(Temp_Date, 'MM-YYYY') AS MMYYYY,&lt;/P&gt;&lt;P&gt;Dual(Year(Temp_Date), if(Month(Temp_Date)&amp;gt;=4, Year(Temp_Date), Year(Temp_Date)-1)) AS MMYYYY_dual_test&lt;/P&gt;&lt;P&gt;Resident Temp_Cal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2018 03:30:02 GMT</pubDate>
    <dc:creator>mokitsu61</dc:creator>
    <dc:date>2018-05-14T03:30:02Z</dc:date>
    <item>
      <title>Strainge behaving of Dual() function</title>
      <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24227#M3978</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;I'm struggling with functions related with Date.&lt;/P&gt;&lt;P&gt;Following test script tries to create tables Master Calender(Temp_Cal) and User Calendar(MMYYYY_tets).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believed [User Calender] returns ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MMYYY | MMYYY_dual_test&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;01-2019 | 2019&lt;/P&gt;&lt;P&gt;02-2019 | 2019&lt;/P&gt;&lt;P&gt;03-2019 | 2019&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but [User Calender] preview shows ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MMYYY | MMYYY_dual_test&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;01-2019 | 2018&lt;/P&gt;&lt;P&gt;02-2019 | 2018&lt;/P&gt;&lt;P&gt;03-2019 | 2018&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I set dual value as so, but I think table preview shows "Real value".&lt;/P&gt;&lt;P&gt;Does anyone know why Table Preview returns such value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------- Test script -------------------&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;Set FirstMonthOfYear = 4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Master Calendar&lt;/P&gt;&lt;P&gt;Temp_Cal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varDateMin_Num&amp;nbsp; = Num(Date#('01-04-2018', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;LET varDateMax_Num&amp;nbsp; = Num(Date#('31-03-2019', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date($(varDateMin_Num) + rowno() - 1) AS Temp_Date&lt;/P&gt;&lt;P&gt;AutoGenerate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(varDateMax_Num) - $(varDateMin_Num) + 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// User Calendar&lt;/P&gt;&lt;P&gt;MMYYYY_test:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date(Temp_Date, 'MM-YYYY') AS MMYYYY,&lt;/P&gt;&lt;P&gt;Dual(Year(Temp_Date), if(Month(Temp_Date)&amp;gt;=4, Year(Temp_Date), Year(Temp_Date)-1)) AS MMYYYY_dual_test&lt;/P&gt;&lt;P&gt;Resident Temp_Cal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 03:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24227#M3978</guid>
      <dc:creator>mokitsu61</dc:creator>
      <dc:date>2018-05-14T03:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Strainge behaving of Dual() function</title>
      <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24228#M3979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;Date(Year(Temp_Date), 'MM-YYYY') AS MMYYYY,&lt;/EM&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;BR /&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;What are you trying to do here? This will take the year of Temp_Date as a number (like 2018), and return a date 2018 days after the start of the date epoch (1 = 31 Dec 1900). I am sure that its not the desired result. Perhaps you mean&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;BR /&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;EM&gt;Date(&lt;STRONG&gt;MonthStart&lt;/STRONG&gt;(Temp_Date), 'MM-YYYY') AS MMYYYY,&lt;/EM&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;EM&gt;&lt;BR /&gt;&lt;/EM&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;I assume the line is part of a fiscal year calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 04:47:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24228#M3979</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-14T04:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Strainge behaving of Dual() function</title>
      <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24229#M3980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There were mistakes in [--- Test sctipt ---].&lt;/P&gt;&lt;P&gt;I hope following new [Test code] tells you what I want to ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------------- Test script -------------------&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;Set FirstMonthOfYear = 4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Master Calendar&lt;/P&gt;&lt;P&gt;Temp_Cal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varDateMin_Num&amp;nbsp; = Num(Date#('01-04-2018', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;LET varDateMax_Num&amp;nbsp; = Num(Date#('31-03-2019', 'DD-MM-YYYY'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date($(varDateMin_Num) + rowno() - 1) AS Temp_Date&lt;/P&gt;&lt;P&gt;AutoGenerate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(varDateMax_Num) - $(varDateMin_Num) + 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// User Calendar&lt;/P&gt;&lt;P&gt;MMYYYY_test:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;// Date(Year(Temp_Date), 'MM-YYYY') AS MMYYYY,&amp;nbsp;&amp;nbsp;&amp;nbsp; // Mistake&lt;/P&gt;&lt;P&gt;Date(Temp_Date, 'MM-YYYY') AS MMYYYY,&lt;/P&gt;&lt;P&gt;Dual(Year(Temp_Date), if(Month(Temp_Date)&amp;gt;=4, Year(Temp_Date), Year(Temp_Date)-1)) AS MMYYYY_dual_test&lt;/P&gt;&lt;P&gt;Resident Temp_Cal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 05:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24229#M3980</guid>
      <dc:creator>mokitsu61</dc:creator>
      <dc:date>2018-05-14T05:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Strainge behaving of Dual() function</title>
      <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24230#M3981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That makes a little more sense. But ths line&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;EM&gt;&amp;gt;&amp;gt;Date(Temp_Date, 'MM-YYYY') AS MMYYYY,&lt;/EM&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;EM&gt;&lt;BR /&gt;&lt;/EM&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;needs to be modified&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;EM style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;&amp;gt;&amp;gt;Date(MonthStart(Temp_Date), 'MM-YYYY') AS MMYYYY,&lt;/EM&gt;&lt;/EM&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;EM style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&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;Otherwise you will land up with multiple records that look the same but have different underlying values. &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;BR /&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;I am still not clear how you want to do the fiscal periods. Search here for 'fiscal calendar', 'financial calendar' etc&lt;EM style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 05:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24230#M3981</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-14T05:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Strainge behaving of Dual() function</title>
      <link>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24231#M3982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My question is ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Dual(Year(Temp_Date), if(Month(Temp_Date)&amp;gt;=4, Year(Temp_Date), Year(Temp_Date)-1)) AS MMYYYY_dual_test&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;MMYYY | MMYYY_dual_test&lt;/P&gt;&lt;P&gt;01-2019 | 2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Value of [MMYYY_dual_test] should be [2019] because I set [MMYYY_dual_test] as Dual(2019, 2018)&lt;/P&gt;&lt;P&gt;02-2019 | 2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;P&gt;03-2019 | 2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2018 05:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strainge-behaving-of-Dual-function/m-p/24231#M3982</guid>
      <dc:creator>mokitsu61</dc:creator>
      <dc:date>2018-05-14T05:27:00Z</dc:date>
    </item>
  </channel>
</rss>

