<?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: IterNo in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572117#M741290</link>
    <description>&lt;P&gt;Something like this:&lt;/P&gt;&lt;PRE&gt;// Load the data from the source
Source:
LOAD STARTDATE, Price, PriceID
FROM ...

// Create tables of dates (months)
Data:
LOAD AddMonths(MinDate, IterNo() - 1) as Month
Where AddMonths(MinDate, IterNo() - 1) &amp;lt;= MaxDate;
LOAD Min(STARTDATE) as MinDate,
	Max(STARTDATE) as MaxDate
Resident Source;

// Interval match the source into the date table (backwards)

Join(Data)
IntervalMatch(Month)
LOAD STARTDATE as From, 
	Alt(Previous(STARTDATE) - 0.1, MakeDate(2999)) as To
Resident Source
ORDER By STARTDATE DESC;

// Optional: bring the price information into the Data table

Join(Data)
LOAD STARTDATE as From, 
	Alt(Previous(STARTDATE) - 0.1, MakeDate(2999))
	Price,
	PriceID
Resident Source
ORDER By STARTDATE DESC;

// Clean the unneeded elements (if the optional second join is used)
DROP Fields From, To;
DROP Table Source;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 Apr 2019 13:22:52 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2019-04-23T13:22:52Z</dc:date>
    <item>
      <title>IterNo</title>
      <link>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572099#M741289</link>
      <description>&lt;P&gt;I have a table with the field Startdate, the table also includes fields for prices and priceid which have diffrent startdates.&lt;BR /&gt;For example it looks like this:&lt;BR /&gt;Startdate Price PriceID&lt;BR /&gt;2018-01-01 55 123456&lt;BR /&gt;2018-05-01 60 123456&lt;/P&gt;&lt;P&gt;Im trying to use IterNo to make the result like this:&lt;BR /&gt;Startdate Price PriceID&lt;BR /&gt;2018-01-01 55 123456&lt;BR /&gt;2018-02-01 55 123456&lt;BR /&gt;2018-03-01 55 123456&lt;BR /&gt;2018-04-01 55 123456&lt;BR /&gt;2018-05-01 60 123456&lt;BR /&gt;2018-06-01 60 123456&lt;BR /&gt;and so on.&lt;/P&gt;&lt;P&gt;This is what I have done:&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;Date(MonthStart(STARTDATE, IterNo()-1)) as Datum&lt;/P&gt;&lt;P&gt;From&lt;BR /&gt;While MonthStart(STARTDATE, IterNo()-1)&amp;lt;=MonthStart(STARTDATE)&lt;/P&gt;&lt;P&gt;What I think needs to be done is to change the last STARTDATE in the While statement but cant figure it out.&lt;BR /&gt;Also need to use ConvertToLocalTime on STARTDATE but dont know how to when using Date(Monthstart(..&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572099#M741289</guid>
      <dc:creator>runesson</dc:creator>
      <dc:date>2024-11-16T21:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: IterNo</title>
      <link>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572117#M741290</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;&lt;PRE&gt;// Load the data from the source
Source:
LOAD STARTDATE, Price, PriceID
FROM ...

// Create tables of dates (months)
Data:
LOAD AddMonths(MinDate, IterNo() - 1) as Month
Where AddMonths(MinDate, IterNo() - 1) &amp;lt;= MaxDate;
LOAD Min(STARTDATE) as MinDate,
	Max(STARTDATE) as MaxDate
Resident Source;

// Interval match the source into the date table (backwards)

Join(Data)
IntervalMatch(Month)
LOAD STARTDATE as From, 
	Alt(Previous(STARTDATE) - 0.1, MakeDate(2999)) as To
Resident Source
ORDER By STARTDATE DESC;

// Optional: bring the price information into the Data table

Join(Data)
LOAD STARTDATE as From, 
	Alt(Previous(STARTDATE) - 0.1, MakeDate(2999))
	Price,
	PriceID
Resident Source
ORDER By STARTDATE DESC;

// Clean the unneeded elements (if the optional second join is used)
DROP Fields From, To;
DROP Table Source;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Apr 2019 13:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572117#M741290</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-04-23T13:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: IterNo</title>
      <link>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572486#M741291</link>
      <description>&lt;P&gt;That didnt change anything, the result I get is the same as before..&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 07:31:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IterNo/m-p/1572486#M741291</guid>
      <dc:creator>runesson</dc:creator>
      <dc:date>2019-04-24T07:31:48Z</dc:date>
    </item>
  </channel>
</rss>

