ChartHop by ChartHop
Carrot (CQL)
understanding cql (carrot) charthop's formula language charthop has a built in expression language called cql, short for carrot query language (we call it carrot) it's the engine behind some of charthop's most powerful capabilities searching, filtering, calculating, and displaying people data exactly the way your organization needs it once you get the hang of it, you'll start noticing it everywhere in the platform where carrot lives the great thing about carrot is that the logic works the same no matter where you're writing it dashboards, forms, the org chart, data sheets, markdown profile tabs — same expressions, just a slightly different wrapper depending on context learn it once and it clicks everywhere where you're working how you write it dashboard charts (advanced mode) {{base / fieldcode1}} form content blocks {{formatmoney(base)}} smart calcs and smart buckets plain expression base fieldcode1 data sheet calculated columns plain expression diffyears(startdate, today()) markdown profile tabs / home page {{ }} for values · {% %} for logic what carrot can do calculate anything compa ratio, tenure, weighted performance scores, prorated salary — if the data lives in charthop, carrot can work with it a couple of quick examples base / fieldcode1 (compa ratio)diffyears(startdate, today()) (tenure in years) filter with real precision carrot is what powers search and filtering across the platform want every active manager in engineering with more than three years of tenure? one expression handles it is\ manager && department func='engineering' && diffyears(startdate, today()) >= 3 label and categorize automatically smart buckets use carrot conditions to color code employees across the org chart and data sheet no manual work, no spreadsheets on the side surface context right inside forms one of our favorite use cases embedding live carrot expressions into review and comp forms so reviewers see everything they need without leaving the page current base {{formatmoney(base)}}tenure {{formatround(diffyears(startdate, today()), 1)}} years show or hide content based on data in markdown tabs and the home page, carrot's logic blocks let you control what people see based on their actual profile data {% if diffyears(startdate, today()) >= 1 %}eligible for annual review {% else %} not yet eligible — less than 1 year of tenure {% endif %} a few things worth knowing carrot references fields by their field code, not their display name, so if a field gets renamed in charthop, you'll want to update any references manually if a field might be empty, get in the habit of adding ? 0 to your formula so it doesn't break on blank values and when you're pulling historical data for reporting or baselines, use asofprimary rather than asof — it keeps draft scenario data out of the picture if you want to go deeper, the cql cheat sheet has the full formula reference and as always, your charthop admin or csm is happy to help you get started
