I have an excel file with 3 coloumns. The first is the starting value, the second is the final value and the third is a flag (1 or 2) that characterizes all the values in the (final - starting) value range.
start finish flag
1 5 D
6 8 D
10 17 C
I have in my data a field that i want to find out during load time, in which value range it resides so as to add the D or C flag of the corresponding range.
Re: match the value of a field with a range of values
Try INTERVELMATCH function. Please find the below from Help File:
In the two tables below, the first one defines the start and end times for the production of different orders. The second one lists a number of discrete events. By means of the IntervalMatch prefix it is possible to logically connect the two tables in order to find out e.g. which orders were affected by disturbances and which orders were processed by which shifts.
Start of shift 1
Line restart 50%
Line speed 100%
Start of shift 2
End of production
First load the two tables as usual, then link the field Time to the time intervals defined by the fields Start and End:
SQL SELECT * FROM OrderLog;
SQL SELECT * FROM Eventlog;
IntervalMatch ( Time ) SQL SELECT Start, End FROM OrderLog;
The following table box can now be created in QlikView: