Video | Tableau | Data visualisation | Productivity

How to do multi-line calculations and edits for Tableau: Quick Tip

Stop hand-typing 27 lines of CASE logic - let VS Code's multi-cursor editing build it for you in seconds.

Part ofTableau quick tips
Watch on YouTube
  • Pasting a column from Excel into VS Code keeps each value on its own line, so you don't have to count rows when building a long calculation
  • Setting VS Code's language to SQL gives you familiar syntax formatting even though you're only using it as a text editor
  • Multi-line cursor shortcuts (option+command+up on Mac) plus the End key let you insert WHEN, speech marks and values across every line at once
  • Command+Shift+L selects all matching text, so you can swap every WHEN to ELSE IF in one go when converting CASE to IF logic
  • This approach is the practical way to edit big logic statements when you're stuck on a published data source and can't just join in new values

In this video, I show you how to tame long Tableau calculations using a third-party text editor. I’ll show you the tricks we need to edit multiple lines of calculations simultaneously while still being able to insert variables from multiple rows in a dataset.Link to the data set: https://j.mp/37A3qTn

The Drilldown
a just-tim newsletter

Liked this? Get the honest take most weeks.

New essays about the industry as they land. My running read on what's worth your attention. By email or on LinkedIn.

5,323 subscribers and counting

or
inRead it on LinkedIn

Email via beehiiv. No spam, unsubscribe any time.