Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
rolandg1881
Creator
Creator

Values between two Values ;-)

Hi!

Sorry for my bad english.

Question to the experts:

I have values like this in columns of a table:  Example 150-220 or 1000-1100

Is there a solution how i get the values between 150-220 like this 150,151,152,153 to 200 in a new column?

 

Thank you very much!

 

Labels (1)
2 Replies
QFabian
Specialist III
Specialist III

Hi @rolandg1881 , pease try this!

Data:
LOAD * INLINE [
Field
150-220
1000-1100
];


Data2:
Load
Field,
subfield(Field, '-',1) as Ini,
subfield(Field, '-', 2) - subfield(Field, '-',1) as Rows
Resident Data;


For vnField = 0 to NoOfRows('Data2') - 1
Let vField = peek('Field', $(vnField), 'Data2');
Let vIni = peek('Ini', $(vnField), 'Data2');
Let vRows = peek('Rows', $(vnField), 'Data2');
Load
'$(vField)' as Field,
$(vIni) + RecNo() as Row
Autogenerate $(vRows);
NExt


exit script;

QFabian
rolandg1881
Creator
Creator
Author

Hi!

Thank you!

I will try it. But im not sure if i explain it correctly. 

In the attachment i send an example.

Thank you.