Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Could Anyone pls explain me below expression..
Replace(Replace(Replace(Replace(Class(GrossEarnings,10000),'<=',''),'x',''),'<','-'),' ','')
Class function will split [GrossEarnings] into buckets of 10,000 giving them names like 0 <= x < 10000
The Replaces changes this formatting to 0-10000 by replacing <= and x with nothing and < with -
You could also use: REPLACE(CLASS(GrossEarnings, 10000),'<= x <','-')
Class function will split [GrossEarnings] into buckets of 10,000 giving them names like 0 <= x < 10000
The Replaces changes this formatting to 0-10000 by replacing <= and x with nothing and < with -
You could also use: REPLACE(CLASS(GrossEarnings, 10000),'<= x <','-')
Class function will give result out put in this format 0 <= x < 10000
above expression is replacing all characters between 0 and 10000 with a dash "-"
you can use this to make it little easy
Replace(Class(GrossEarnings,10000),' <= x < ','-')
But still i htink you can improve more as above will give you output like below.
0-10000
10000-20000
20000-30000
....
....
If you see you dont know 10000 is included in first set or second set, so try using below
=subfield(Class(GrossEarnings,10000),' <= x < ',1)&'-'&subfield(Class(GrossEarnings,10000),' <= x < ',2)-1
this will give you output like this
0-9999
10000-19999
20000-29999
Thank you so much..
Thank you so much..
Rather use the much simpler:
Num(Class(GrossEarnings,10000))