Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use rangemax,Chart level its working but in script its not working
Any idea...
Sivaraj S
LOAD
*,RANGEMAX(a,b,c,d,e) as TEXT ; // each field has single value
resident tmp;
TEXT getting all the values
Hi,
If a, b, c, d and e are fields, then RANGEMAX(a,b,c,d,e) will return the maximum value among those values for each record.
RANGEMAX(a,b,c,d,e) as TEXT
I didn't understand about this "TEXT getting all the values", if you do not want a, b, c, d, e fields then just use following script
LOAD
RANGEMAX(a,b,c,d,e) as TEXT
resident tmp;
Regards,
Jagan.
So a,b,c,d and e are fields in your tmp table, right?
What are the values of all these fields? You mentioned that you got
1
2
3
4
returned for the RANGEMAX(a,b,c,d,e) function. So these are the first four values of your TEXT field?
Could you post the first four complete lines for your table, including TEXT and a,b,c,d,e?
Are all your values numericals or are you coping with text values? You might want to consider using rangemaxstring(a,b,c,d,e) as TEXT
then.
It would be best if you could post a small sample app that demonstrates what you are trying to achieve and your issue. If this is not possible, please provide a sufficient snippet of your script and some sample data (input to your code snippet / output table).
Hi sweuhl,
I guess rangemax is not working because of data stored in qvd is below format
A | B | C | D | E | F |
0.0664067 | 0.2287981 | 0.3416996 | 0.3334835 | 0.0607539 | 0.3978605 |
0 | |||||
0.0839515 | |||||
0 | |||||
0.2428004 | |||||
0 | |||||
0.2099772 | |||||
0 | |||||
0.1059254 | |||||
0 | |||||
0.0761975 | |||||
0 | |||||
0.1439361 |
i am using for loop to get values based on customer
for 1st loop i giving correct value if it goes to 2nd further its storing like the table above
Can you suggest me on this
You are using for loop to get values based on customer?
Are the above table fields the only fields in your table? I guess you need to have at least one more field, your dimension (maybe customer)?
If so, you could try using a group by load
Result:
LOAD Dimension,
Rangemax(sum(A),sum(B),sum(C),sum(D),sum(E),sum(F)) as RangeMax
resident YourTable group by Dimension;