Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Categorising Data

Hi There,

I have some data which I want to group/divide by its value. I want to split the data into three categories: value <10k, value <50k and Value >50k. How would I do this in a pie chart as an example? Do I need to set variables?

thanks

1 Solution

Accepted Solutions
danieloberbilli
Specialist II
Specialist II

or even better to do it in the script and create a new Field named (e.g.) Category:

LOAD

Field1,

if(Field1<10000,'Category A',

     if(Field1<=50000,'Category B',

          if(Field1>50000,'Category C')))  as Category

FROM ...

View solution in original post

6 Replies
MK_QSL
MVP
MVP

This could be done either in the script or using ValueList Function at the UI end..

Better if you can provide sample data to work... Thanks

danieloberbilli
Specialist II
Specialist II

you could use a calculated dimension with

if(Field1<10000,'Category A', if(Field1<=50000,'Category B', if(Field1>50000,'Category C'))) 

danieloberbilli
Specialist II
Specialist II

danieloberbilli
Specialist II
Specialist II

or even better to do it in the script and create a new Field named (e.g.) Category:

LOAD

Field1,

if(Field1<10000,'Category A',

     if(Field1<=50000,'Category B',

          if(Field1>50000,'Category C')))  as Category

FROM ...

amit_saini
Master III
Master III

Rob,

Agreed with Daniel suggestion , also have a look on link below:

assign variable to categorise values from data tables

Thanks,

AS

Not applicable
Author

Thanks for all your help, I've got it working and looking great!