<?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 Multiple autogenerated calendars in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22536#M3780</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;I am trying to build a script that generates multiple calendars from a table given the minimun and maximun date per each row in the table. Right now I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TablaDep:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TipoDep, MesesDep&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Auto, 48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Otros, 120&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&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;Tabla:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDFactura, TipoDep, Monto, Fecha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C64079E0-A73C-4A7D-A0A6-C21636E18864, Auto, 10000,Ene 2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31848A13-6189-4E61-95BD-775C2BDFF296, Auto, 20000,Feb 2017&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C733D223-C797-4DE9-B3A2-B9B207E833E7, Auto, 50000,Mar 2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E7EBD819-3311-4145-9B6C-19DC3AE39C01, Auto, 60000,Jun 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F85A59CE-F3B2-4068-9A52-D4829B9B93CF, Auto, 30000,Jun 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;left join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TipoDep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MesesDep&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident TablaDep;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop Table TablaDep;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;t:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RowNo() as DepNum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Monto/MesesDep as DepMensual,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date#(Fecha,'MMM YYYY') as StartDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;monthname(addmonths(Date#(Fecha,'MMM YYYY'),+MesesDep)) as FinalDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Tabla;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop Table Tabla;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RENAME Table t to Tabla;&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;This created a table with the amounts I need to add to each month (DepMensual) and the start and finishing dates of the calendar, that would be: StartDate and FinalDate.&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;I know I can autogenerate a calendar with this:&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;set vMaxdate=date(AddMonths(today(),+10));&lt;/P&gt;&lt;P&gt;set vMindate=Date(AddMonths(today(),-15)); &lt;/P&gt;&lt;P&gt;tempCal:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;$(vMindate)+iterno()-1 as tempdate,&lt;/P&gt;&lt;P&gt;date($(vMindate)+iterno()-1) as Date,&lt;/P&gt;&lt;P&gt;Monthname($(vMindate)+iterno()-1) as MonthYear&lt;/P&gt;&lt;P&gt;autogenerate 1&amp;nbsp; while $(vMindate)+iterno()-1&amp;lt;=$(vMaxdate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am stock thinking how to create a loop where my variables for Mxdate and Mindate change for each rowno() and IDFactura inside my table: "Tabla". I am thinking maybe a for loop would do the job, but I cannot see how to put it together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2018 21:35:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-13T21:35:43Z</dc:date>
    <item>
      <title>Multiple autogenerated calendars</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22536#M3780</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;I am trying to build a script that generates multiple calendars from a table given the minimun and maximun date per each row in the table. Right now I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TablaDep:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TipoDep, MesesDep&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Auto, 48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Otros, 120&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&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;Tabla:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDFactura, TipoDep, Monto, Fecha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C64079E0-A73C-4A7D-A0A6-C21636E18864, Auto, 10000,Ene 2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31848A13-6189-4E61-95BD-775C2BDFF296, Auto, 20000,Feb 2017&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C733D223-C797-4DE9-B3A2-B9B207E833E7, Auto, 50000,Mar 2018&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; E7EBD819-3311-4145-9B6C-19DC3AE39C01, Auto, 60000,Jun 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; F85A59CE-F3B2-4068-9A52-D4829B9B93CF, Auto, 30000,Jun 2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;left join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TipoDep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MesesDep&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident TablaDep;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop Table TablaDep;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;t:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;load*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RowNo() as DepNum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Monto/MesesDep as DepMensual,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date#(Fecha,'MMM YYYY') as StartDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;monthname(addmonths(Date#(Fecha,'MMM YYYY'),+MesesDep)) as FinalDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Tabla;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop Table Tabla;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RENAME Table t to Tabla;&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;This created a table with the amounts I need to add to each month (DepMensual) and the start and finishing dates of the calendar, that would be: StartDate and FinalDate.&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;I know I can autogenerate a calendar with this:&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;set vMaxdate=date(AddMonths(today(),+10));&lt;/P&gt;&lt;P&gt;set vMindate=Date(AddMonths(today(),-15)); &lt;/P&gt;&lt;P&gt;tempCal:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;$(vMindate)+iterno()-1 as tempdate,&lt;/P&gt;&lt;P&gt;date($(vMindate)+iterno()-1) as Date,&lt;/P&gt;&lt;P&gt;Monthname($(vMindate)+iterno()-1) as MonthYear&lt;/P&gt;&lt;P&gt;autogenerate 1&amp;nbsp; while $(vMindate)+iterno()-1&amp;lt;=$(vMaxdate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am stock thinking how to create a loop where my variables for Mxdate and Mindate change for each rowno() and IDFactura inside my table: "Tabla". I am thinking maybe a for loop would do the job, but I cannot see how to put it together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 21:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22536#M3780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-13T21:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple autogenerated calendars</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22537#M3781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your expected values in the tabla at the end? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 01:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22537#M3781</guid>
      <dc:creator>yujiyamane</dc:creator>
      <dc:date>2018-03-14T01:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple autogenerated calendars</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22538#M3782</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 am expecting to get a single table with the concatenated auto generated calendars from each row in the original "Tabla". So I should get a table with two columns, IDFactura and Month, with 240 rows (5 original rows times 48 for each row). I am working on the for loop, and so far I have this, but it gives me an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('Tabla')&lt;/P&gt;&lt;P&gt;let vStartDate= peek('StartDate',i,'Tabla');&lt;/P&gt;&lt;P&gt;let vEndDate= peek('EndDate',i,'Tabla');&lt;/P&gt;&lt;P&gt;let vNomCalendar= peek('DepNum',i,'Tabla');&lt;/P&gt;&lt;P&gt;let v&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IDFactura&lt;/SPAN&gt;= peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IDFactura&lt;/SPAN&gt;',i,'Tabla');&lt;/P&gt;&lt;P&gt;$(vNomCalendar):&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;$(v&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IDFactura&lt;/SPAN&gt;) as IDDep,&lt;/P&gt;&lt;P&gt;Monthname($(vStartDate),+iterno()-1) as MonthYear&lt;/P&gt;&lt;P&gt;autogenerate 1&amp;nbsp; while $(vStartDate)+iterno()-1&amp;lt;=$(vEndDate);&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error is that I am missing a ")", but I dont seem to see where is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 04:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22538#M3782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-14T04:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple autogenerated calendars</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22539#M3783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need a calendar for or from each row? Surely the calendar should start at the earliest value of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;StartDate, and end at the maximum value FinalDate?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T_MINMAX:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Min(StartDate) as minDate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Max(FinalDate) as maxDate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Tabla;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vMaxdate = Peek('maxDate');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vMindate = Peek('minDate');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table T_MINMAX;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then build the calendar using this date range.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 04:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-autogenerated-calendars/m-p/22539#M3783</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-03-14T04:49:46Z</dc:date>
    </item>
  </channel>
</rss>

