Calculating with your uploaded data in Datawrapper is now easier

We’re happy to announce that we replaced the old JavaScript-based formulas you had to type when adding a column with a syntax that’s closer to Excel or Google Sheets.

Let’s see what that means.

For a few years now, you could add columns in step 2: Check & Describe when creating a Datwrapper chart. They could help you sum up columns, replace or split text, deal with dates, create random numbers, and do a dozen things more. All this is still possible – we just made it easier to use.

Say you uploaded a column called “values” to the Datawrapper chart editor. Now you want to multiply it with itself, five times. So you go to step 2: Check & Describe and click on “Add column”. Last week you then had to type in Math.pow(values, 6), a JavaScript formula. Now you can simply type values ^ 6.

You can find the full list of expressions in our Academy.

Here’s an overview of what changed and what didn’t:

New: Easier syntax

You don’t need to type JavaScript code anymore. If you know Excel or Google Sheets, you won’t have trouble using our “Add column” feature. Here are two examples:

  • Instead of Math.round(values*10)/10, you can now type ROUND(values, 1)
  • Instead of using && and || in your IF statements, you can now use the simpler and and or.

New: Calculate with added columns

You can now add a column and include columns in your calculations that you calculated earlier.

The video at the top shows an example: We first create a column called gdp and then use that column in an IF statement to create the column small economy?.

Still there: Aggreations

We’re trying to save you some time, so each number column comes with aggregated values. For example, to get a column with the minimum value of your column percentchange, you can write percentchange__min. Datawrapper also supports __max, __sum, __mean and __median.

This can be helpful for conditions:

IF(salary > salary__mean, "earns more than the average", "earns less than the average")

The expression above gives you a column that shows whose salaries are greater or smaller than the average one.

Still there: Added columns update when the data updates

Your added columns adapt to your data. Say your Datawrapper chart links to a CSV or Google Sheet and the data changes. Or you paste new data in step 1. In both cases and as long as the column headers stay the same, the calculations will run again on the new data. Your added columns will always show the correct numbers.

Curious? Try it out

To add a new column yourself and explore how they work, hover over the following chart and click “Edit this chart” in the top right corner. This will bring you into step 3: Visualize. Now go back to step 2, and you will see that we already added two new columns. Play around with them or add more:

“What happens to my old added columns?”

You might have added columns and calculations in the past. These charts will still work correctly: We changed your formulas to make them work with the new syntax. In case something still looks unexpected, please let us know at support@datawrapper.de and we’ll fix it as soon as possible.


We hope the new syntax makes it easier to calculate with your data. You can find more explanations and four examples of how to use added columns in our Academy article “How to calculate in added columns”. Feedback, questions, hints? Write to us at support@datawrapper.de. We’re happy to hear from you.

We have updated our Privacy Policy to reflect the new EU regulations. Please give it a read (it is written with the goal of clarity) and click here to accept it.