What about using a macro like;
Function getContinuum (min,max)
s=min & ";"
if( int(min)<>min or int(max)<>max) then
min = min * 100
max = max * 100
do while min<max
min = min +1
if b then
s=s & min/100 & ";"
s=s & min & ";"
Then in script:
getContinuum(min,max) as continuum
a simpler solution might be:
LOAD *, min+If(Frac(min),0.01,1)*(IterNo()-1) as continuum FROM [https://community.qlik.com/thread/194232] (html, codepage is 1252, embedded labels, table is @1) While min+If(Frac(min),0.01,1)*(IterNo()-1)<=max;
hope this helps
QlikCommunity_Thread_194232.qvw 150.8 K
Thank you again for your suggestion on the while loop. As I mentioned earlier it did work. But upon further validation, I found that for some stores, the continuum does not reach the max value, even using the same logic. I have attached my qvw. Max from both stores is 0.54. But for store #1, continuum does not reach the max value. It stops at 0.55. Store #2 works as it should. In this case, lower is better. So I am subtracting .01 from the min value each time until it reaches the max.
It seems that the min value for store 1 (ceil(0.70395633,.01)= .71) is the problem. Because if you change the min to max and do while loop with .01 increment, for store 1, continuum goes up to only 0.7. This code is commented in the qvw.
Also, if you look at the continuum values, sometimes it is creating two sets of continuum values over the same range for each of the stores.
Any help or explanation would be greatly appreciated. I am totally stumped as to why this would not be working. Thank you in advance.
Test.qvw 152.0 K
check this out
IterNo() as i,
0.01*(IterNo()-1) as step,
min + 0.01*(IterNo()-1) as currentvalue
WHILE min*100 + IterNo() - 1 <= max * 100
floor(target, .01) as min,
ceil(score, .01) as max
store, score, target
1, 0.70395633, 0.5479
2, 0.66028157, 0.5479