Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Iterno()

Hi Everyone,

I have ID, Start_Date and End_Date variables. I want to use Iterno() function to expand my table like table below.

Can anybody explain that how I can do that?

My table;

IDStart_DateEnd_Date
11.01.20203.01.2020
210.01.202012.01.2020
326.01.202027.01.2020

 

My result That I want;

IDDate
11.01.2020
12.01.2020
13.01.2020
210.01.2020
211.01.2020
212.01.2020
326.01.2020
327.01.2020
Labels (1)
2 Solutions

Accepted Solutions
Highlighted
Partner
Partner

Try this script:

 

SET DateFormat='D.MM.YYYY';
Load 
  ID,
  dayname(Start_Date - 1 + IterNo()) as Date
Inline [
  ID, Start_Date,End_Date
  1, 1.01.2020, 3.01.2020
  2, 10.01.2020, 12.01.2020
  3, 26.01.2020, 27.01.2020]
While
   Start_Date - 1 + IterNo() <= End_Date
;

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted

Try this

Table:
LOAD ID,
	 Date(Start_Date + IterNo() - 1) as Date
While Start_Date + IterNo() - 1 <= End_Date;
LOAD * INLINE [
    ID, Start_Date, End_Date
    1, 1.01.2020, 3.01.2020
    2, 10.01.2020, 12.01.2020
    3, 26.01.2020, 27.01.2020
];

View solution in original post

4 Replies
Highlighted
Partner
Partner

Try this script:

 

SET DateFormat='D.MM.YYYY';
Load 
  ID,
  dayname(Start_Date - 1 + IterNo()) as Date
Inline [
  ID, Start_Date,End_Date
  1, 1.01.2020, 3.01.2020
  2, 10.01.2020, 12.01.2020
  3, 26.01.2020, 27.01.2020]
While
   Start_Date - 1 + IterNo() <= End_Date
;

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted

Try this

Table:
LOAD ID,
	 Date(Start_Date + IterNo() - 1) as Date
While Start_Date + IterNo() - 1 <= End_Date;
LOAD * INLINE [
    ID, Start_Date, End_Date
    1, 1.01.2020, 3.01.2020
    2, 10.01.2020, 12.01.2020
    3, 26.01.2020, 27.01.2020
];

View solution in original post

Highlighted
Partner
Partner

It looks like I and @sunny_talwar  agrees on how to solve this. 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted

Yes we do 🙂