<?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 - Field 'a' not found Error in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Master-Calendar-Field-a-not-found-Error/m-p/2001250#M11577</link>
    <description>&lt;P&gt;It means that by:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(varMinDate) + Iterno()-1 As Num&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;the variable&amp;nbsp;&lt;SPAN&gt;$(varMinDate) has no valid value else is NULL. This might be caused from your&amp;nbsp;INVOICE_DATE which might be not interpreted numeric else as a string which would affect your min/max aggregation as well as the num() wrapping of the peek().&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another cause could be that&amp;nbsp;INVOICE_DATE isn't a date else a timestamp. In this case the value has a decimal-delimiter and if the delimiter is a comma the variable would interpret it as delimiter for the variable itself and not for the value and again the result would be NULL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 14:09:00 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2022-11-07T14:09:00Z</dc:date>
    <item>
      <title>Master Calendar - Field 'a' not found Error</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Master-Calendar-Field-a-not-found-Error/m-p/2001205#M11575</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this my first post here in this website but i have&amp;nbsp; learend alot from it, but know im facing problem with master calender as this message pop up when i tried to load the script&lt;/P&gt;
&lt;DIV class="headline edc_error"&gt;"The following error occurred:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;Field 'a' not found&lt;/DIV&gt;
&lt;DIV class="empty edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="headline edc_error"&gt;The error occurred here:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;TempCalendar: LOAD + Iterno()-1 As Num,"&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;and here is my script :&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;
&lt;P&gt;&lt;BR /&gt;QuartersMap:&lt;/P&gt;
&lt;P&gt;MAPPING LOAD&lt;/P&gt;
&lt;P&gt;rowno() as Month,&lt;/P&gt;
&lt;P&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&lt;/P&gt;
&lt;P&gt;AUTOGENERATE (12);&lt;/P&gt;
&lt;P&gt;Temp:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;min("INVOICE_DATE") as minDate,&lt;/P&gt;
&lt;P&gt;max("INVOICE_DATE") as maxDate&lt;/P&gt;
&lt;P&gt;Resident Collection_Dashboard;&lt;/P&gt;
&lt;P&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp'));&lt;/P&gt;
&lt;P&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&lt;/P&gt;
&lt;P&gt;DROP Table Temp;&lt;/P&gt;
&lt;P&gt;TempCalendar:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;$(varMinDate) + Iterno()-1 As Num,&lt;/P&gt;
&lt;P&gt;Date($(varMinDate) + IterNo() - 1) as TempDate&lt;/P&gt;
&lt;P&gt;AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&lt;/P&gt;
&lt;P&gt;MasterCalendar_Collection:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;TempDate AS "INVOICE_DATE",&lt;BR /&gt;&lt;BR /&gt;date( floor(Timestamp(TempDate, 'MM/DD/YYYY hh:mm:ss TT')),'DD/MM/YYYY') as "Date",&lt;BR /&gt;&lt;BR /&gt;week(TempDate) As Week,&lt;/P&gt;
&lt;P&gt;Year(TempDate) As Year,&lt;/P&gt;
&lt;P&gt;Month(TempDate) As Month,&lt;/P&gt;
&lt;P&gt;Day(TempDate) As Day,&lt;BR /&gt;&lt;BR /&gt;// YeartoDate(TempDate)*-1 as CurYTDFlag,&lt;/P&gt;
&lt;P&gt;// YeartoDate(TempDate,-1)*-1 as LastYTDFlag,&lt;BR /&gt;&lt;BR /&gt;// inmonth(today(),TempDate,0)*-1 as MTD_FLAG,&lt;BR /&gt;&lt;BR /&gt;// InMonthToDate( TempDate,AddYears(($(vDateToday)),-1),0)*-1 as LYMTD_FLAG,&lt;BR /&gt;&lt;BR /&gt;If( TempDate - YearStart(TempDate) &amp;lt;= Today() - YearStart(Today()), 1, 0 ) as IsInYTD,&lt;BR /&gt;&lt;BR /&gt;if( Day(TempDate)= today(),&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if(month(TempDate) = Month(today()) and Day(TempDate) &amp;lt;= Day(today()),1,0) ,&lt;BR /&gt;&lt;BR /&gt;if(month(TempDate) = Month(today()) and Day(TempDate) &amp;lt;= Day(today()-1),1,0)) as IsInMTD, &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if(month(TempDate) = Month(today()) and Day(TempDate) &amp;lt;= Day(today()-1),1,0) as IsInLYMTD, &lt;BR /&gt;&lt;BR /&gt;// InMonthToDate(TempDate,$(vDateToday),-1,4)*-1 as LMTD_FLAG,&lt;/P&gt;
&lt;P&gt;date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&lt;BR /&gt;&lt;BR /&gt;// num(Year(TempDate) )+ num( Month(TempDate)) as "MonthYear Num",&lt;BR /&gt;num(Year(TempDate) )&amp;amp; num( Month(TempDate),'00') as "MonthYear Num",&lt;BR /&gt;num(Year(TempDate) )&amp;amp; num( Month(TempDate),'00')&amp;amp; num( Day(TempDate),'00') as "MonthYearDay Num",&lt;BR /&gt;&lt;BR /&gt;num(Year(TempDate) )&amp;amp; num( Month(TempDate),'00')&amp;amp; num( Week(TempDate),'00') as "MonthYearWeek Num",&lt;BR /&gt;&lt;BR /&gt;num(Year(TempDate)-1 )&amp;amp; num( Month(TempDate),'00') &amp;amp; num( Day(TempDate),'00') as "LYMTD_Date_Num",&lt;BR /&gt;&lt;BR /&gt;// floor( date#( date( floor(Timestamp(TempDate, 'MM/DD/YYYY hh:mm:ss TT')),'YYYYMMY'),'YYYYMMY')) as "MonthYear Num",&lt;BR /&gt;&lt;BR /&gt;// ( date(TempDate, 'YYYYMM')) as "MonthYear Num",&lt;/P&gt;
&lt;P&gt;ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&lt;/P&gt;
&lt;P&gt;Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,&lt;/P&gt;
&lt;P&gt;WeekDay(TempDate) as WeekDay&lt;/P&gt;
&lt;P&gt;Resident TempCalendar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Order By TempDate ASC;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Join&lt;/P&gt;
&lt;P&gt;load&lt;BR /&gt;1 as "MAx MTD",&lt;BR /&gt;date(max("Date"),'DD/MM/YYYY') as "MAX MTD Date",&lt;BR /&gt;"MonthYear Num"&lt;/P&gt;
&lt;P&gt;Resident&lt;BR /&gt;MasterCalendar_Collection&lt;BR /&gt;where IsInMTD = 1&lt;BR /&gt;Group by "MonthYear Num";&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Drop Table TempCalendar;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;store Collection_Dashboard into [lib://Sadeem (lebara_qlik.admin)/Collection_Dashboard.qvd](qvd);&lt;BR /&gt;store MasterCalendar_Collection into [lib://Sadeem (lebara_qlik.admin)/MasterCalendar_Collection.qvd](qvd);&lt;/P&gt;
&lt;P&gt;exit script;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Nov 2022 12:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Master-Calendar-Field-a-not-found-Error/m-p/2001205#M11575</guid>
      <dc:creator>SAD93</dc:creator>
      <dc:date>2022-11-07T12:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar - Field 'a' not found Error</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Master-Calendar-Field-a-not-found-Error/m-p/2001250#M11577</link>
      <description>&lt;P&gt;It means that by:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(varMinDate) + Iterno()-1 As Num&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;the variable&amp;nbsp;&lt;SPAN&gt;$(varMinDate) has no valid value else is NULL. This might be caused from your&amp;nbsp;INVOICE_DATE which might be not interpreted numeric else as a string which would affect your min/max aggregation as well as the num() wrapping of the peek().&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Another cause could be that&amp;nbsp;INVOICE_DATE isn't a date else a timestamp. In this case the value has a decimal-delimiter and if the delimiter is a comma the variable would interpret it as delimiter for the variable itself and not for the value and again the result would be NULL.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 14:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Master-Calendar-Field-a-not-found-Error/m-p/2001250#M11577</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-11-07T14:09:00Z</dc:date>
    </item>
  </channel>
</rss>

