<?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: Master Calendar - date field not mapping to year as date is null in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526586#M37845</link>
    <description>Yes i think i would like it to be associated with resolved date if available and if null then associate the year with created date. Thanks i will look into that, hopefully solves it.</description>
    <pubDate>Fri, 04 Jan 2019 19:17:21 GMT</pubDate>
    <dc:creator>leivers1</dc:creator>
    <dc:date>2019-01-04T19:17:21Z</dc:date>
    <item>
      <title>Master Calendar - date field not mapping to year as date is null</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526564#M37840</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a master calendar which is based off resolved date, see below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since the Resolution Date contains "NULL" Values,&amp;nbsp;as not&amp;nbsp; everything has been "Resolved" this means anything with a null resolved date is not being mapped to a year.&amp;nbsp;Is there a better way to create my calendar&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="04-01-2019 5-37-06 PM.png" style="width: 895px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3080i9F616E6BE3D5A1F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="04-01-2019 5-37-06 PM.png" alt="04-01-2019 5-37-06 PM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="04-01-2019 5-47-36 PM.png" style="width: 324px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3087i62098095752E25BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="04-01-2019 5-47-36 PM.png" alt="04-01-2019 5-47-36 PM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Temp]:  
Load  
               min(resolvedate) as minDate,  
               max(resolveddate) as maxDate  
Resident [ISSUE];  
  
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));  
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));  
DROP Table Temp;

[TempCalendar]:  
LOAD  
               $(varMinDate) + Iterno()-1 As Num,  
               Date($(varMinDate) + IterNo() - 1) as TempDate  
               AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);   
               
[MasterCalendar]:  
Load  
               TempDate AS resolveddate,  
               week(TempDate) As Week,  
               Year(TempDate) As Year,  
               Month(TempDate) As Month,  
               Day(TempDate) As Day,  
               YeartoDate(TempDate)*-1 as CurYTDFlag,  
               YeartoDate(TempDate,-1)*-1 as LastYTDFlag,  
               inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,  
               date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,  
               ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,  
               Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,  
               WeekDay(TempDate) as WeekDay  
Resident TempCalendar
Order By TempDate ASC;  

Drop Table TempCalendar; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526564#M37840</guid>
      <dc:creator>leivers1</dc:creator>
      <dc:date>2024-11-16T06:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar - date field not mapping to year as date is null</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526565#M37841</link>
      <description>&lt;P&gt;Since the resolved date is null, which year should it be associated with? Is this based on createdate? Maybe you need&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Canonical-Date/ba-p/1463578" target="_blank"&gt;Canonical Date&lt;/A&gt;&amp;nbsp;here&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 18:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526565#M37841</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-04T18:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar - date field not mapping to year as date is null</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526586#M37845</link>
      <description>Yes i think i would like it to be associated with resolved date if available and if null then associate the year with created date. Thanks i will look into that, hopefully solves it.</description>
      <pubDate>Fri, 04 Jan 2019 19:17:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526586#M37845</guid>
      <dc:creator>leivers1</dc:creator>
      <dc:date>2019-01-04T19:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar - date field not mapping to year as date is null</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526591#M37846</link>
      <description>&lt;P&gt;Then may be create a new field like this&lt;/P&gt;&lt;PRE&gt;If(Len(Trim(resolveddate)) &amp;gt; 0, resolveddate, createdate) as &lt;FONT color="#FF0000"&gt;new_resolveddate&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;and then you calendar will be like this&lt;/P&gt;&lt;PRE&gt;[Temp]:  
Load  
               min(&lt;FONT color="#FF0000"&gt;new_resolvedate&lt;/FONT&gt;) as minDate,  
               max(&lt;FONT color="#FF0000"&gt;new_resolveddate&lt;/FONT&gt;) as maxDate  
Resident [ISSUE];  
  
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));  
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));  
DROP Table Temp;

[TempCalendar]:  
LOAD  
               $(varMinDate) + Iterno()-1 As Num,  
               Date($(varMinDate) + IterNo() - 1) as TempDate  
               AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);   
               
[MasterCalendar]:  
Load  
               TempDate AS &lt;FONT color="#FF0000"&gt;new_resolveddate&lt;/FONT&gt;,  
               week(TempDate) As Week,  
               Year(TempDate) As Year,  
               Month(TempDate) As Month,  
               Day(TempDate) As Day,  
               YeartoDate(TempDate)*-1 as CurYTDFlag,  
               YeartoDate(TempDate,-1)*-1 as LastYTDFlag,  
               inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,  
               date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,  
               ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,  
               Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,  
               WeekDay(TempDate) as WeekDay  
Resident TempCalendar
Order By TempDate ASC;  

Drop Table TempCalendar; &lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jan 2019 19:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-date-field-not-mapping-to-year-as-date-is-null/m-p/1526591#M37846</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-04T19:26:50Z</dc:date>
    </item>
  </channel>
</rss>

