Binning Data

You can divide dimension data into bins in either the cBase or cPlan. For example, to create a histogram using age data binned by Age Group:

cBase

build {
  ...
  add "Age Group" ```
    case(value("Age") < 10, "0 - 9",
         value("Age") < 20, "10 - 19",
         value("Age") < 30, "20 - 29",
         "30+")
  ```
}

cPlan

cplan {
  ...
  dimension "Age Group" ```
    case(value("Age") < 10, "0 - 9",
         value("Age") < 20, "10 - 19",
         value("Age") < 30, "20 - 29",
         "30+")
  ```
  ...
}

 

See also What Is Data Binning?