Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator II
Creator II

Script - Determine and write number circle

Hello,

I have a table with three columns.

There is a fixed value in the first column.
In the second column the minimum value of a number range.
In the third column the maximum value of the number range.

Value Min Max
A 1 100
B 101 150
C 151 200

I want to write a subscript with Qlik that writes all numbers of the number range with the value from the first column.

It should look like that:

 

Value Number
A 1
A 2
A 3
A 4
... ...
B 101
B 102
B 103
... ...
C 151
... ...
C 200

 

Can any of you please help me?

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

This is easiest to achieve using Load... while:

Load Value, Min + IterNo()-1 as Number
While Min+IterNo()-1<=Max;
Load * INLINE [
Value, Min, Max
A, 1, 100
B, 101, 150
C, 151, 200];

View solution in original post

2 Replies
Or
MVP
MVP

This is easiest to achieve using Load... while:

Load Value, Min + IterNo()-1 as Number
While Min+IterNo()-1<=Max;
Load * INLINE [
Value, Min, Max
A, 1, 100
B, 101, 150
C, 151, 200];

reporting_neu
Creator II
Creator II
Author

Perfect and so easy! 

Thank you!!!! 😄