Qlik Community

Ask a Question

App Development

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

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
luke1986
Contributor III
Contributor III

Generate a number sequence in a single Cell

Hello Folks,

This is a trickey one, my Sample Data looks like this:

IDFrom-ToSequence
110-7010
220-5010

 

The Output should look like this:

IDOutput
110,20,30,40,50,60,70
220,30,40,50

 

Has any one a solution?

 

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

And tricky sometimes draws more attention!Smiley Wink  Try like:

Load
	ID,
	Concat(Output, ',') as Output
Group By ID;	
Load
	ID,
	From+Sequence*(IterNo()-1) as Output
While From+Sequence*(IterNo()-1) <=To;	

Load *,
	SubField([From-To], '-',1) as From,
	SubField([From-To], '-',2) as To
Inline [
ID,	From-To,	Sequence
1,	10-70,	10
2,	20-50,	10]

Capture.JPG

View solution in original post

2 Replies
tresesco
MVP
MVP

And tricky sometimes draws more attention!Smiley Wink  Try like:

Load
	ID,
	Concat(Output, ',') as Output
Group By ID;	
Load
	ID,
	From+Sequence*(IterNo()-1) as Output
While From+Sequence*(IterNo()-1) <=To;	

Load *,
	SubField([From-To], '-',1) as From,
	SubField([From-To], '-',2) as To
Inline [
ID,	From-To,	Sequence
1,	10-70,	10
2,	20-50,	10]

Capture.JPG

View solution in original post

luke1986
Contributor III
Contributor III
Author

Nice One! Thanks!