<?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 Problem using month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-using-month/m-p/157770#M33133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't get why you need to create this temp Calendar, and then a master Calendar. There is an easier way.&lt;/P&gt;&lt;P&gt;If I were you, I would do the following :&lt;/P&gt;&lt;P&gt;Pre_Fakta :&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;from annOrd.qvd;&lt;/P&gt;&lt;P&gt;concatenate(Pre_Fakta)&lt;/P&gt;&lt;P&gt;Pre_Fakta :&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;from Order.qvd;&lt;/P&gt;&lt;P&gt;And then what changes is to do directly a master calendar loading resident tables of AnnOrd.qvd and Order.qvd , and also you're only gonna get the available dates (because I think it has not sense to show a date with non related values) :&lt;/P&gt;&lt;P&gt;MasterCalendar :&lt;/P&gt;&lt;P&gt;Load date,&lt;/P&gt;&lt;P&gt;year(date) as year,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;resident Pre_Fakta;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Oct 2010 00:43:15 GMT</pubDate>
    <dc:creator>marcel_olmo</dc:creator>
    <dc:date>2010-10-28T00:43:15Z</dc:date>
    <item>
      <title>Problem using month</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-month/m-p/157769#M33132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;From my sctipt:&lt;/P&gt;&lt;P&gt;Pre_Fakta:&lt;BR /&gt;LOAD FOKID,&lt;BR /&gt;FTGID,&lt;BR /&gt;KundNr,&lt;BR /&gt;AnnulleradOrder_Uppläggningsdatum as Date,&lt;BR /&gt;AnnulleradOrder_OrdNr,&lt;BR /&gt;4 as Source&lt;BR /&gt;FROM $(include=path.txt)AnnOrd.qvd (qvd);&lt;/P&gt;&lt;P&gt;Concatenate(Pre_Fakta)&lt;BR /&gt;LOAD FOKID,&lt;BR /&gt; FTGID,&lt;BR /&gt; KundNr,&lt;BR /&gt; Uppläggningsdatum as Date,&lt;BR /&gt; OrderNrKvar,&lt;BR /&gt; OrderNrIn,&lt;BR /&gt; 1 as Source&lt;BR /&gt;FROM $(include=path.txt)Order.qvd (qvd);&lt;/P&gt;&lt;P&gt;Fakta:&lt;BR /&gt;NOCONCATENATE LOAD *&lt;BR /&gt;RESIDENT Pre_Fakta&lt;BR /&gt;ORDER BY Date ASC;&lt;/P&gt;&lt;P&gt;Drop table Pre_Fakta;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TempOrder:&lt;BR /&gt;LOAD max(Date) as MaxDate,&lt;BR /&gt;min(Date) as MinDate&lt;BR /&gt;RESIDENT Fakta;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LET varMinDate = Num(Peek('MinDate', 0, 'TempOrder'));&lt;BR /&gt;//LET varMaxDate = Num(Peek('MaxDate', 0, 'TempOrder'));&lt;BR /&gt;LET varMaxDate = num(today());&lt;BR /&gt;LET varToday = num(today());&lt;/P&gt;&lt;P&gt;Drop Table TempOrder;&lt;/P&gt;&lt;P&gt;//*************** Temporary Calendar ***************&lt;BR /&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt; $(varMinDate) + rowno() - 1 AS Num,&lt;BR /&gt; date($(varMinDate) + rowno() - 1) AS TempDate&lt;BR /&gt;AUTOGENERATE&lt;BR /&gt; $(varMaxDate) - $(varMinDate) + 1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//*************** Master Calendar ***************&lt;BR /&gt;MasterCalendar:&lt;BR /&gt;LOAD TempDate AS Date,&lt;BR /&gt; Week(TempDate) AS Week,&lt;BR /&gt; Year(TempDate) AS Year,&lt;BR /&gt; Month(TempDate) AS Month,&lt;BR /&gt; Day(TempDate) AS Day,&lt;BR /&gt; Weekday(TempDate) AS WeekDay,&lt;BR /&gt; 'Q' &amp;amp; ceil(month(TempDate / 3)) AS Quarter,&lt;BR /&gt; Date(monthstart(TempDate), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt; Week(TempDate)&amp;amp;'-'&amp;amp;Year(TempDate) AS WeekYear,&lt;BR /&gt; inyeartodate(TempDate, $(varToday), 0) * -1 AS CurYTDFlag,&lt;BR /&gt; inyeartodate(TempDate, $(varToday), -1) * -1 AS LastYTDFlag&lt;BR /&gt;&lt;BR /&gt;RESIDENT TempCalendar&lt;BR /&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCalendar;&lt;/P&gt;&lt;P&gt;My problem is that Month, Week, Day, Year aso (created in the MasterCalender) only has values when the row originate from Order.qvd.&lt;BR /&gt;All rows from AnnOrd.qvd have Date but not Week, Month Year Day aso are missing.&lt;/P&gt;&lt;P&gt;Anyone that can enlighten me and tell me what i am doing wrong?&lt;BR /&gt;They are stored in the same table with the same function and I can see that all rows in the AnnOrd.qvd file are within the MaxDate and MinDate.&lt;/P&gt;&lt;P&gt;br&lt;BR /&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Oct 2010 15:03:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-month/m-p/157769#M33132</guid>
      <dc:creator />
      <dc:date>2010-10-25T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Problem using month</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-month/m-p/157770#M33133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't get why you need to create this temp Calendar, and then a master Calendar. There is an easier way.&lt;/P&gt;&lt;P&gt;If I were you, I would do the following :&lt;/P&gt;&lt;P&gt;Pre_Fakta :&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;from annOrd.qvd;&lt;/P&gt;&lt;P&gt;concatenate(Pre_Fakta)&lt;/P&gt;&lt;P&gt;Pre_Fakta :&lt;/P&gt;&lt;P&gt;Load ...&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;from Order.qvd;&lt;/P&gt;&lt;P&gt;And then what changes is to do directly a master calendar loading resident tables of AnnOrd.qvd and Order.qvd , and also you're only gonna get the available dates (because I think it has not sense to show a date with non related values) :&lt;/P&gt;&lt;P&gt;MasterCalendar :&lt;/P&gt;&lt;P&gt;Load date,&lt;/P&gt;&lt;P&gt;year(date) as year,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;resident Pre_Fakta;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 00:43:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-month/m-p/157770#M33133</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-10-28T00:43:15Z</dc:date>
    </item>
  </channel>
</rss>

