/
Add, edit, delete, and reorder Visual SQL steps
Our documentation has moved!

Our documentation now lives on the Atlassian Support site at https://support.atlassian.com/analytics/resources/.

Add, edit, delete, and reorder Visual SQL steps

Visual SQL steps help you transform your data and get it to the format you need for your charts. After running your initial query (which is always the first Visual SQL step), you can add (then modify) more Visual SQL steps.

Add a Visual SQL step

New Visual SQL steps are added under the currently selected step in Visual SQL. So if you want the new step to be the last step, make sure you select the last step before adding the new one. You can add as many steps as you’d like, in any order. You can also use each step multiple times as needed.

Some steps even allow you to add custom transformations using our built-in formulas and SQLite syntax.

Steps are applied in order from first to last, so in some cases, it’s possible for a later step to override an earlier one.

Edit a Visual SQL step

To make changes to a Visual SQL step or remove it altogether:

  1. Hover over the step block

  2. Select the Pencil to edit or the Trash to remove

Alternatively, you can double-click a step block to edit it.

Deleting a query step from Visual SQL also deletes any transformation steps applied to it.

Pencil and Trash icons for a pivot step in Visual SQL

Reorder Visual SQL steps

If you added a Visual SQL step after the wrong step, it’s easy to move it to the correct place. To reorder Visual SQL steps:

  1. Select and hold the step that you want to move.

  2. Drag it to the target location. You’ll see a blue line to indicate where the step will be placed once you let go.

  3. Edit other steps as needed. Be aware of reordering steps involving renamed or hidden columns—it might cause your chart to break.

Undo or redo

Quickly undo or redo Visual SQL steps and other changes by selecting the Undo or Redo arrows, respectively.

Maybe you accidentally deleted a step. No problem—just undo the deletion to quickly restore it! You can even keep selecting Undo to go all the way back to the initial state of your chart in your current session.

To undo, try using Cmd + Z (Mac) or Ctrl + Z. To redo, try using Cmd + Y (Mac) or Ctrl + Y or Ctrl + Shift + Z.

Undo and redo buttons in the chart preview pane

Preview data

To preview your data at any point in your Visual SQL steps, select the step and you’ll see its result set shown in the result table. It can be incredibly useful to compare how your data looks before and after a transformation step is applied.