Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Quick question...how do I go about grouping some of my underlying data??
This is what I currently have:
A field named PRTY with data like this 100, 101, 102, 200, 201, 203, 300, 308, 309, 400 etc
How do I get that field to map to a high level group, so instead of showing the above it groups into fields like:
000+
100+
200+
300+
400+
So the 100's would go into 100+, the 200's would go into 200+ and so on...
Any help is greatly appreciated
You can use the floor function: floor(PRTY,100) as PRTY_Group. If you want the + added so you get 100+ I'd use this: dual(floor(PRTY,100)&'+',floor(PRTY,100)) as PRTY_Group. That way it will display as 100+ etc, but can still be sorted numerically.
It's ugly but in a dimension you could do =Round(if(PRTY=0,PRTY,PRTY-50),100)
You can use the floor function: floor(PRTY,100) as PRTY_Group. If you want the + added so you get 100+ I'd use this: dual(floor(PRTY,100)&'+',floor(PRTY,100)) as PRTY_Group. That way it will display as 100+ etc, but can still be sorted numerically.
In script:
repeat('0', (3 - len(Floor(PRTY/100)))) & Floor(PRTY/100) & '+' as GroupName
or in expression:
repeat('0', (3 - len(Floor(PRTY/100)))) & Floor(PRTY/100) & '+'
This is brilliant, thanks for all of the help.