Can you format your numbers to the right scale?

The main focus of the challenge I set this week, was to provide a reference example for the undocumented custom number format option of ‘scale’. which automagically determines whether the number should be formatted to millions (M) or thousands (k) etc. This revelation was shared via a blog post by Roxanne Agerone

To make the challenge a little more interesting, I included some expand/collapse capability. This is driven by a parameter

pSegment

string parameter, defaulted to <empty string>

The display shows a + or – aganst the Segment depending whether it is collapsed or expanded. I created a new field for this

Segment Display

IIF([pSegment]=[Segment], ‘- ‘ + [Segment], ‘+ ‘ + [Segment])

The Sub-Category should only display for the selected Segment; to handle this create

Display

IF [Segment] = [pSegment] THEN [Sub-Category]ELSE ” END

On a new sheet, add Segment Display and Display to Rows and Sales to Columns. Show the pSegment parameter.

type in ‘Corporate’ into the pSegment field and that will expand, but notice, we’ve lost the ‘total’ for the Corporate value

Let’s start to resolve this. Firstly add Segment to Colour and adjust to suit. The apply a Sort to the Segment Display field, so it sorts by Sales descending

To get the Corporate Total to display, select Analysis > Totals > Add all Subtotals from the menu, and then from the same menu, select Column Totals to Top

While this has given what we need for Corporate, we now have duplicate rows for the unexpanded Segments. One of these rows has the word ‘Total’ in the Display column, while the other is blank. The trick here is just to ‘hide’ the rows where Display = blank. Simply click on the cell with the blank, right click and select hide.

This will remove these fields from the display (to get them back select Analysis > Reveal Hidden Data from the menu).

Now finalise by, applying a sort to the Display field to also sort by Sales descending.

Remove the Total label, by right clicking on the cell > format and deleting the text from the Totals > Label field

Make the rows a little wider, then add Sales to Label. Apply a custom number format to the field of “$”0.0[scale] which is the secret sauce to this challenge!

Apply formatting as required – I added row dividers, removed gridlines, adjusted the colour of text etc, and removed axis and column headers. I also adjusted the Tooltip text.

Finally, to ensure the dashboard interactivity behaved as I wanted without fields being highlighted on click, I created the following feilds

False

FALSE

Segment for Param

IIF([pSegment]=[Segment],”,[Segment])

to allow the display to reset.

Add both of these to the Detail shelf

Add the sheet to a dashboard, then create the following dashboard actions

Set Segment

Change Parameter dashboard action that on Select of the viz, sets the pSegment parameter with the value from the Segment for Param field.

Highlight

Highlight dashboard action, that on select of the viz, targets itself, highlighting just the False field (as this exists on every mark, everything is highlighted, which means it doesn’t look highlighted 🙂 )

And apart from any other styling you might apply, that should be the crux of the challenge. My published viz is here.

Happy vizzin’!

Donna

Let’s tell a story with map layers!

For #WOW2026 Week36, Sean challenged us to use map layers to recreate the famous John Snow cholera map from 1854. He provided 3 csv data sets that I downloaded.

Despite there being 3 data sets, and only 1 sheet to build, this challenge did not require any data modelling to combine the data sets in any way. I just added each csv as it’s own data source, so my workbook had 3 data sources

  • Deaths by Building
  • Pump Locations
  • Sewergrate Locations

The story is driven by a parameter

pScroll

integer parameter with a list of values from 1 to 4, defaulted to 1 (Homes and Buildings), where each number has a text display

Each data set has a Latitude and Longitude field, which is key to creating the points we want to display on the map.

Building the 1st story point/map layer

In the Deaths by Building data source, create a new field

Building Location

IIF([pScroll]=1,MAKEPOINT([Latitude],[Longitude]),NULL)

Double click on this field, and a map with the building points will automatically be created. Change the mark type to Circle, add ID to Detail, change the colour of the circle as desired, adding a border. Increase the mark size. Adjust Tooltip as required.

To add more detail to the map background, click Map > Background Layers from the menu and choose Style = Light, and then remove all options except Base and Streets, Highways/Motorways

Building the 2nd story point/map layer

If it’s not already visible, show the pScroll parameter.

Still in the Deaths by Building data source, create another field

Building Location (Deaths)

IIF([pScroll]<>1,MAKEPOINT([Latitude],[Longitude]),NULL)

Change the pScroll parameter to 2-Deaths – you’ll momentarily lose the map details.

Drag Building Location (Deaths) onto the canvas and drop it when the Add a Marks Layer option appears.

Your map will reappear as a second marks layer.

Change the mark type to Circle, add ID to Detail. Add Deaths to Size, then adjust the size as required. Add Deaths to Colour and adjust the colour palette as required. Add a darker border to the marks. Adjust Tooltip.

If you change the pScroll parameter to the 1st option, you should now see the original set of marks built as the 1st map layer. Change to any other option and you’ll see the above set of marks.

Building the 3rd story point/map layer

Set the pScroll parameter to option 3 (Sewerage vents).

In the Sewergate locations data source, create the field

Sewer Location

IIF([pScroll]=3,MAKEPOINT([Latitude],[Longitude]),NULL)

and then drag onto the canvas. Add ID to Detail, change the mark type to circle, adjust the colour and size and add a dark border to the mark. Then move the Sewer Location marks card so it sits between the Building Location and Building Location (Deaths) marks card. This places the sewer marks beneath the Building Deaths marks. Adjust Tooltip.

Building the 4th story point/map layer

Set the pScroll parameter to option 4 (Pumps).

In the Pump locations data source, create the field

Pump Location

IIF([pScroll]=4,MAKEPOINT([Latitude],[Longitude]),NULL)

and then drag onto the canvas. Add ID and Name to Detail, change the mark type to shape. Create a new field

Is Broad Street Pump

[Name] = ‘Broad St Pump’

and add this to the Shape shelf, and then adjust the shapes. Add the same field to the Colour shelf too, and adjust. Increase the size. Adjust Tooltip.

Managing the story text

Initially I used a calcluated field to define the text based on an IF statement related to the pScroll parameter, and then added this field to the view, so I could make it the title of the sheet. But the spacing was just completely off. So instead, I add the map to a dashboard along with 4 text fields. Each text field had the relevant story point text within it. I then used dynamic zone visibility to control which text box was displayed when. For this I created 4 calculated fields

Step 1

[pScroll] = 1

Step 2

[pScroll] = 2

Step 3

[pScroll] = 3

Step 4

[pScroll] = 4

and then referred to these in the control visibility using value option on the dashboard layout section

And that should be it. My published viz is here.

Happy vizzin’!

Donna

Can you use a published data source and web edit to create a Cyclone Path Map?

For this week’s challenge, Lorna wanted to continue showcasing the ability to now use published data sources in Tableau Public, so this week was all about online authoring, something I rarely (if ever) do.

Connecting to the data source

From the link in the challenge, you need to select the Historical Tropical Cyclones data source, and then I selected Create Viz to start the build

Creating the Calculated field

We need to categorise the storms using the info in the challenge requirements, so create

Tropical Storm System

CASE [Usa Sshs]
WHEN -5 THEN ‘Unknown’
WHEN -4 THEN ‘Post-tropical’
WHEN -3 THEN ‘Miscellaneous disturbances’
WHEN -2 THEN ‘Subtropicakl’
WHEN -1 THEN ‘Tropical depression’
WHEN 0 THEN ‘Tropical storm’
WHEN 1 THEN ‘Category 1’
WHEN 2 THEN ‘Category 2’
WHEN 3 THEN ‘Category 3’
WHEN 4 THEN ‘Category 4’
WHEN 5 THEN ‘Category 5’
END

We also need to identify the start date of each storm. For this I first converted the Iso Time field into a datetime

ISO Datetime

DATETIME([Iso Time])

and then used a FIXED LOD to determine the minimum date per storm and season

Start Date per Storm

{FIXED [Name], [Season (Year)]:MIN([ISO Datetime])}

I then used this field to capture just the month per date, which is needed for the filter control.

Month, Year

DATE(DATETRUNC(‘month’,[Start Date per Storm]))

To build the map, I decided to use map layers, so created a loation point for the latitude and longitude fields provided

Point

MAKEPOINT([LAT],[LON])

Finally for the bar chart, we need a count of storms per category within the selected timeframe

#No of Storms

COUNTD([ISO Datetime])

Building the bar chart

Set Season (Year) to be a discrete dimension, then on a new sheet, add Season(Year) to filter and select 2026 from the list presented.

Then add Month,Year to Filter, select the ‘blue’ Month / Year option (middle of the list displayed)…

.. then select Select from list from the List dropdown, and select just June 2026 and July 2026

Once both fields are on the Filter shelf, set them so they both apply to all worksheets using the data source, as the same filters will be needed when the map is built.

Add Tropical Storm System to Rows and #No of Storms to Columns. Sort Tropical Storm System by the minimum of the Usa Sshs field ascending

Change the mark type to a bar and add Tropical Storm System to Colour, adjusting colour as required.

Double click into Columns and manually type MIN(1) to create a secondary axis. Move Tropical Storm System from the Colour shelf to the Label shelf on this marks cark. Change the mark type to Gantt Bar, reduce the Size and set the opacity on the colour shelf to 0.

Edit the Min(1) axis to start at 0 and end at 1. Then set the chart to dual axis (but DO NOT synchronise the axis). Set the chart to fit entire view. Hide both axis and the header column (uncheck show header)

Adjust Tooltip. The format via the Format > Worksheet menu option. Set background of worksheet to black, remove row & column dividers, turn off all gridlines, zero lines

Building the Map

On a new sheet, double click Point which should automatically generate a map, with the filters already applied.

Change the mark type to circle and add Name and ISO Datetime as a discrete exact date (blue pill) to Detail. Add Usa Wind (Kts) to Size and Tropical Storm System to Colour. Apply a sort to the Tropical Storm System field, this time to sort by Usa Sshs field descending. Adjust Tooltip to suit.

Set the background colour of the map to dark (Map > background maps menu option). Remove the halo from the marks (via the Colour shelf).

Now drag another instance of Point towards the top of the canvas, and drop when the add a marks layer option appears,to create a 2nd marks card (Point 2). Change this mark type to line and move the marks card to be beneath the one labelled Point.

Add Name to Detail and ISO Datetime as a continuous exact date (green pill) to Path. Duplicate the Usa Wind (Kts) pill to create a ‘copy’ version, and add this to Size. Having a second instance, allows the size on the 2 marks cards to vary. Adjust the size to suit so it is larger than the circle marks, and change the Colour to white. Add Tropical Storm System to Tooltip then adjust tooltip.

Add SID to the Detail shelf on both marks cards too. Format this worksheet too, to remove any row/column dividers etc.

Add both the sheets to a dashboard, using layout containers to arrange the objects. Format the dashboard to have a dark background too.

My published via is here.

Happy vizzin’!

Donna

Can you visualise a common starting point?

Kyle set this week’s challenge focusing on visualising the effectiveness of a product launch. This type of chart I sometimes refer to as a ‘rocket chart’. We’ll build this as two separate charts.

Build the current time view

Build the basic view by adding Date to Columns, as a continuous (green) pill adjusted to the Week Number level, and Daily Orders to Rows. If need be, adjust the Date Property of the data source so the week starts on a Sunday (right click data source > Date Properties). Doing this will ensure the data aligns with the solution. Add Product to Colour (and adjust) and add Product to Label, setting the label to match mark colour.

Kyle wasn’t explicit about the current timeframe, but it seems essentially the concept is to show the last year / last 52 weeks. Add Date to Filter as a relative date filter and set to last 52 weeks, and check the Anchor relative to box, and enter the date 15 Aug 2026 (this is necessary to ensure the viz is static – it’s essentially fixing ‘today’ to 15 Aug 2026).

Adjust the Tooltip to suit, remove the axis titles, and hide all the gridlines. Rename the sheet appropriately.

Build the common start view

Create new fields

Launch Week

DATE(DATETRUNC(‘week’, {FIXED [Product]:MIN([Date])}))

Week of Date

DATE(DATETRUNC(‘week’ ,[Date]))

and

Weeks Since Launch

DATEDIFF(‘week’, [Launch Week], [Week of Date])

This gives us a normalised position for each product. Add Weeks Since Launch as a continuous dimension (green dis-aggregated pill) and add Daily Orders to Rows. Again add Product to Colour and Text.

We only want to show the 1st 52 weeks, so create

Filter Weeks

[Weeks Since Launch]<=52

and add to the Filter shelf and set to True.

Add Week of Date to Tooltip and adjust. Remove the y-axis title, hide the x-axis completely (uncheck show header), and hide all the gridlines. Rename the sheet appropriately.

Apply the sheet-swap

Create a parameter

pView

integer parameter displaying aliased values as below

Then create fields

Show Common Start

[pView] = 2

Show Current View

[pView] = 1

Add the 2 sheets to a dashboard. Click the ‘current view’ object, and on the Layout tab set the Control Visibility using value checkbox, and select the Show Current View field

Repeat, by clicking on the ‘Common Start’ object and selecting the Show Common Start option in the Control visibility option.

Tidy up the dashboard as desired and that should be it.

My viz is published here.

Happy vizzin’!

Donna

Can you use Sets to highlight top and bottom performing States & Cities?

Lorna ‘set’ this week’s challenge based on sets … see what I did there … 🙂 Let’s jump straight it…

Create the sets

We’re going to use the ‘out of the box’ functionality for this (ie right click dimension -> Create -> Set) to create various sets.

Right click State/Province to create set

Top 5 States

Select the Top tab, and adjust fields as below

Repeat to create

Top 1 State

This time, change the number from 5 to 1

Repeat process to create

Bottom 5 States

In the create set dialog, select ‘Bottom’ from the drop down rather than Top, and ensure number is set to 5

Repeat to create

Bottom 1 State

setting the number to 1

Then do a similar process but right click on City to create sets Top 5 Cities and Bottom 5 Cities

Creating the calculations to style the marks

The marks on the map are coloured, shaped, and sized based on the logic associated to these sets, so let’s create the various calcs needed for this

Colour – State

IF [Top 1 State] THEN ‘dark blue’
ELSEIF [Top 5 States] THEN ‘blue’
ELSEIF [Bottom 1 State] THEN ‘dark orange’
ELSEIF [Bottom 5 States] THEN ‘orange’
ELSE ‘grey’
END

Colour – City

IF [Top 5 Cities] THEN ‘dark’
ELSEIF [Bottom 5 Cities] THEN ‘mid’
ELSE ‘light’
END

Size

IF [Top 5 Cities] THEN ‘big’
ELSEIF [Bottom 5 Cities] THEN ‘mid’
ELSE ‘small’
END

Shape

IF [Top 5 Cities] THEN ‘star’
ELSEIF [Bottom 5 Cities] THEN ‘cross’
ELSE ‘circle’
END

Creating the calculations for the Tooltip

The tooltip needs to show the counts of various city related measures, so to start I worked out the number of Cities

Count Cities

COUNTD([City])

then created

Top Cities in State

COUNTD(IIF([Top 5 Cities], [City],NULL))

and

Bottom Cities in State

COUNTD(IIF([Bottom 5 Cities], [City],NULL))

and with all these I could then create

Other Cities in State

[Count Cities] – ([Top Cities in State] + [Bottom Cities in State])

Now we have all this, we can build the viz

Building the Map

Double click State/Province and a map should automagically get created. Change the mark type to Map, then add Country/Region to Detail to make all the states filled.

Add Colour – State to the Colour shelf and adjust to suit. Add Sales, Top Cities in State, Bottom Cities in State and Other Cities in State to Tooltip and adjust as required.

Now drag City onto the canvas and drop when you see the Add a Marks Layer option

This will create another marks card.

Add State/Province and Country/Region to Detail and change the mark type to Shape.

Add Colour – City to the Colour shelf and Shape to the Shape shelf and adjust both as required.

The add Size to the Size shelf and adjust the size by setting it to reversed and adjusting the Size slider if need be.

Then add Sales to the Tooltip and then adjust the Tooltip as needed.

Finally, format the map

  • remove row/column dividers
  • Go to Map menu > background layers and then uncheck all options
  • Go to Map menu > map options and uncheck all options.

And that should be enough – just add the map to a dashboard and publish.

My published version is here.

Happy vizzin’!

Donna

Can you build a ladder chart?

It was my turn to set the #WOW2026 Week 30 challenge, and I based it on a viz I started building some time ago, but never finalised. Given Wimbledon has recently finished, I thought it was the perfect opportunity to get this one over the line. There are multiple components to this, so I split the challenge into ‘Levels’ to help people focus on what to work on, if time was limited.

Defining the core calcs

The data provided contains 1 row per match Sinner has played in, and each match is associated to a tournament. While typically matches in a tournament are played over several days, in the dataset the Date field is the same for all matches in a single tournament, so can be used a a unique identifier for a tournament.

The ladder chart is essentially a bump chart where each round in a tournament is ‘ranked’ based on how far into the tournament the round is, where the Final is the highest rank ie 1. So the first step is to assign a ‘rank’/position to each round.

Round Position

CASE [Round]
WHEN ‘F’ THEN 1
WHEN ‘SF’ THEN 2
WHEN ‘QF’ THEN 3
WHEN ‘R16’ THEN 4
WHEN ‘R32’ THEN 5
WHEN ‘R64’ THEN 6
WHEN ‘R128’ THEN 7
WHEN ‘Q3’ THEN 8
WHEN ‘Q2’ THEN 9
WHEN ‘Q1’ THEN 10
WHEN ‘RR’ THEN 11
END

We then need to be able to identify the best round achieved in the tournament

Best Round per Date

{FIXED [Date]: MIN([Round Position])}

We also need to identify the Grand Slam tournaments from other tournaments. I’ve used a set for this. Right click on Tournament > create > set

Is Grand Slam

select the 4 entries : Australian Open, Roland Garros, Wimbledon, US Open

I’ve also created a parameter

pGrandSlamsOnly

boolean parameter, defaulted to True, with the True option aliased as Grand Slams Only and False aliased as All Tournaments

I then created

Filter – Matches

([pGrandSlamsOnly] AND [Is Grand Slam]) OR NOT([pGrandSlamsOnly])

This will return true if either pGrandSlamsOnly = Grand Slams Only (ie is True) AND the tournament is a member of the Is Grand Slam set, or pGrandSlamsOnly = All Tournaments (ie is False)

To ensure only the best round per tournament is shown, I also created

Keep Best Round Only

[Round Position] = [Best Round per Date]

Finally, we need to identify if Sinner was the winner of the match or not. We can determine this by looking for the name Sinner in the text of the Match field which precedes the string ‘d. ‘ . (I assume d. stands for ‘defeated’).

Is Winner

CONTAINS(TRIM(SPLIT([Match], “d.”, 1 )),”Sinner”)

Building the ladder chart

On a new sheet, add Round to Filter and exclude RR. Add Keep Best Round Only to Filter and set to True. Add Filter – Matches to Filter and set to True. Then finally add Surface to Filter and select all options.

Add Date to Columns as a continuous (greed) exact date, and add Round Position as a continuous dimension (unaggregated green pill) to Rows. Edit the y-axis and reverse the axis. Change the mark type to a line and set the path to be a stepped line.

Add Tournament, Rank, Date, Surface and Round to the Tooltip shelf. Adjust the number format of the Rank field so it is a number with 0dp but prefixed with #. Adjust the format of the Date field on the Tooltip to be mmmm yyyy (ie August 2019 format).

Additionally, create a field

Label:Unranked

IIF(ISNULL([Rank]),’Unranked’,NULL)

and add this to Tooltip too, the adjust tooltip as required. Reduce the Size of the line and adjust the colour (I used #7ed0d9). Set the background colour of the worksheet too (I used #f7fcf5)

Add another instance of Round Position to the Rows to make a 2nd marks card. Set the mark type to Shape and add Is Winner to Shape. Increase the mark size. Set shapes accordingly. Add Surface to Colour and adjust to suit (I used colours from the hue circle palette, reduced to 60% opacity). Then make the chart dual axis and synchronise axis.

Add Is Winner to the Size shelf of the 2nd marks card, and adjust sizes to suit too, so the Star is at least as big as the other mark.

Remove all row/column dividers, gridlines, zero lines, axis lines etc.

To make the labelled ‘ladder rungs’, we’re simply adding multiple constant reference lines. Right click the left hand y-axis > add reference line. Add a constant at 10, labelled Q1 with a blue dotted line.

Then format the label so it is aligned in the middle of the line (I reduced font to 8pt) and removed any shading

Then repeat 9 more times for each ‘rung’ 🙂

At the end, hide both the axis (uncheck show header) and remove the x-axis title. Fix the x-axis from 01 Aug 2017 to 01 Jun 2027. The test the filters work as expected.

Building the Viz in Tooltip

On a new sheet, add Date as a discrete exact date (blue pill), Round, Match to Rows. Go back to the Ladder chart and set the Round, Filter – Matches and Surface filters to apply to this worksheet too. Apply a sort to the Round pill, to sort by the Round Position field.

Add Score to the Text shelf. Then double click into Columns and type the text ‘Result’, then right click the ‘Result’ text and hide labels for columns.

Go back to the Ladder chart and update the Tooltip – insert the VIT sheet, and adjust the size /width as required and apply filters to Date & Tournament.

On hover, the list of matches should now display

Building the KPIs

We need a few fields for this

Tournaments

COUNTD([Date])

Matches

COUNT([Sinner])

Note – this is just referring to the automatic sheet row count field

Wins

IIF([Is Winner?],1,0)

Titles

IIF([Is Winner?] AND [Keep Best Round Only],1,0)

Grand Slams

IIF([Is Grand Slam] AND [Is Winner?] AND [Keep Best Round Only],1,0)

On a new sheet, Add Measure Names to Columns and Measure Values to Rows. Remove the measures that aren’t required. Apply the same ‘shared’ filters to this sheet.

Change the mark type to a shape and use a transparent shape. Add Measure Names to Label and arrange labels middle centre, and format as required. Set the worksheet background to match the ladder viz.

Building the strip plot

Create a new field

Within Top 10

[Rank]<=10

On a new sheet, add this to Filter and set to True. Then apply the other 3 shared filters to this sheet.

Add Date to Columns as a continuous exact date (green pill). Fix the axis to the same dates as before 01 Aug 2017 to 01 Jun 2027. Set the Mark type to Circle and add Rank to colour, reversing the range as required so the lower number is darker. Set the circle to have a border and 80% opacity. Add Date, Surface, Tournament and Rank to Tooltip and adjust as required. Remove all gridlines, row/column dividers, gridlines etc and set background colour as before.

The double click into Rows and type MIN(0) to create a y-axis. Then add a 0 constant reference line (as before) but label this Within Top 10. The hide both the x and y-axes.

Building the dashboard

Now you have all the components, they just need to be added to a dashboard. Use layout containers to help with this. To ensure the ladder chart & the strip plot align, arrange these in a vertical container. Both objects should be set to fit entire view and any padding to the left or right of the objects should be identical.

The item hierarchy of my dashboard is below.

My published viz is here.

Happy vizzin’!

Donna

Can you build a Pareto chart with coloured backgrounds?

This week’s challenge was a guest post by Lisa Hitch to generate a pareto chart, but adding visual clues via background colours and lines to highlight the key areas of focus.

Ultimately, this was a relatively simple table calculation challenge, requiring just 2 calculations.

Running Sum % of Customers

RUNNING_SUM(COUNTD([Customer ID])) / TOTAL(COUNTD([Customer ID]))

Running Sum % of Sales

RUNNING_SUM( SUM([Sales]) / TOTAL(SUM([Sales])))

Just to see what these are doing, add Customer ID into Rows and Sales onto Text. Sort by Sales descending (this is a key feature in getting the pareto chape we need).

Create another field

cust count

COUNTD([Customer ID])

and add this into the table (we ultimately don’t need this field, but just creating so it’s clear what’s happening.

Add a Running Total quick table calculation to the cust count field – the field will now show a cumulative total down the table

Also create a field

total cust

TOTAL(COUNTD([Customer ID]))

Add this to the table too – every row reports the same – the total number of distinct customers int he data set.

Now adding Running Sum % of Customers into the table, you can see that the result of this field is a calculation of cust count and total cust. We could have broken it down like this, but I chose to just use a single calculation.

We could apply similar principals to the Sales field so you can see how this is derived, but hopefully you get the gist. Ultimatel, the data we need is below

On a new sheet, add Running Sum % of Sales to Rows, Running Sum % of Customers to Columns and Customer ID to Detail. Adjust both the table calculation to be explicitly computing by Customer Id and apply a sort on the Customer ID pill, to be sorted by Sales descending.

Change the mark type to Area and adjust the colour and set opacity to 100%.

To set the background colours, we’ll used fixed reference bands.

Right click the X-axis and Add Reference Line. Select Band and then set a constant from 0 to 0.1 and colour as required.

Repeat the process 4 more times, creating bands for 01-0.2, 0.2-0.8, 0.8-0.9 and 0.9-1.

The add reference lines to provide the 20% & 80% intersection lines. This time, select the Line option and again use constants, but rather than fill, select a thick white line

Again repeat to create a line at 0.8 on the X-axis. Then add reference lines to the Y-axis at the same intervals.

Add an annotation to the point where the X-axis = 20%. Use the tooltip to find the exact point where % of customers = 20% (this can be a bit fiddly), then right click and Annotate > Mark. Edit the annotation as required, then format the resulting text box as required. Repeat for the point at which the Y-axis = 80%.

Finish off by hiding all tooltips, removing all gridlines & row/column dividers, and fixing both axes from 0-1. Then add to a dashboard and you’re done.

My published viz is here.

Happy vizzin’!

Donna

Let’s try the Drive Time Area

For this week’s challenge, Yoshi introduced the new 2026.2 feature – the drive time selection tool. As a result you’ll need at least Desktop or Desktop Public v2026.2 to complete it. At the point of writing, it’s not available via Tableau Public web authoring, which also means you can’t interact with my published version on Tableau Public. You’ll need to download it to try it out.

Building the map

After connecting to the grocery store data, we need to define the location of each store to add to the map

Store Location

MAKEPOINT([Latitude],[Longitude])

Add this to the Detail shelf and the set the map background layer (Map menu > background layers) to streets, with a 30% washout. Uncheck all options except the top 3.

Add Object ID to Detail and Storename and Address to Tooltip. Change the mark type to circle and adjust colour as required, reducing opacity to 75% and adding a border. Adjust size as required too.

Create a new location for the Union Station, using the coordinates provided in the requirements

Union Station

MAKEPOINT(38.8977, -77.0063)

Drag this onto the map and drop when the ‘Add a marks layer’ option appears. This will create another marks card.

Change the mark type of this card to shape and select a star shape. Change colour and size. Adjust tooltip to read the word ‘Union Station’.

We now need to isolate the District of Colombia region. I confess, I got so far with this, but couldn’t get the area outside of the map to not be visible, so had to check out Yoshi’s solution.

Connect to a version of Superstore Data. Create a field

DC

IF [State/Province] = ‘District of Columbia’
THEN [State/Province]
END

Make sure this field is assigned a geographic role of State/Province (right click field > Geographic role)

Drag DC onto the canvas to create another map layer. Change the mark type to Map. The shape of DC should be displayed.

Reduce the opacity of the colour to 0% and add a border.

Create another field

Not DC

IF [State/Province] <> ‘District of Columbia’
THEN [State/Province]
END]

Set this to have a geographic role of State/Province.

Add this to the canvas, and set the mark type to Map.

Set the colour of this to a pale grey at 100% opacity with no border or halo. The move this marks card so it is below the DC one. This should make the border appear as the ‘DC’ card is now ‘on top’. Remove row/column dividers.

Set Disable Selection against both the DC and Not DC marks cards via the context menu against the card name

Adjust the map via zoom to ensure it fills as much as the canvas as possible, then update the map options (Map menu > map options) to ensure you can’t pan/zoom. Map should be pinned into position, and only the selection toolbar should be enabled, which includes the drive time selection tool.

Building the KPI

The number of stores is just the auto-generated count of the dataset. But we’re going to use a Set to capture the stores selected.

Create a set by right clicking o Object ID > Create > Set

Selected Stores

Don’t make any selections initially

Create field

# Selected Stores

SUM(IIF([Selected Stores],1,0))

Add this field and dc-grocery-clean.csv(Count) to Text. Change the mark type to shape, and assign a transparent shape. Set the canvas to Entire View and format the text as required and align the label top left.

Adding the interaction

Add the 2 sheets side by side on a dashboard using layout containers. Create a dashboard set action

Select Stores

On select of the Map sheet, add values to the set Selected Stores. When the selection is cleared, remove all values.

And that should be it. My published viz which you can download is here.

Happy vizzin’!

Donna

Can you show the difference from selected sales?

For this week’s challenge, Lorna asked us to complete the challenge by not using LoDs or Table Calcs. Parameters and parameter actions were necessary though (originally I started without using them either, as I misread the information).

Building the core bar chart

As mentioned, we’re going to use parameters to capture the info we need. So start by creating

pSelectedSubCat

string parameter to store the name of the Sub-Category selected – default to Storage

pSelectedSales

float parameter to store the Sales value of the selected sub category. Set this to 224,645 which is the value associated to Storage and set the display format to $ with 0dp.

The plan is that when ‘No Comparison is selected, the pSelectedSubCat will contain nothing ie an empty string of ” “, and pSelectedSales will be 0.

Based on this, we need to define the value to display in the bar, which typically is the difference between the Sub-Category sales and the sales of the pSelecedSubCat (ie the value in pSelectedSales). But in the event No Comparison is selected, we just want the sales. So create

Difference

IIF([pSelectedSales]>0,SUM(Sales)-[pSelectedSales],SUM([Sales]))

is if we have a value in pSelectedSales, return the difference between the Sales value and it, otherwise just return Sales.

Set a custom number format of “$”#,##0;-“$”#,##0;””

Note the last setting after the 2nd “;” is the formatting for a 0 – in this case I’ve set it to ” ” ie nothing/<empty string>, so a value won’t get displayed against the bar of the selected Sub Category

Add Sub-Category to Rows and Difference to Columns. Explicitly sort the SubCategory pill to be sorted by Sales descending

Show mark labels, and widen the bars a bit. Adjust bar colour as required. Add a column grand total, and display at the top (Analysis menu > totals > show column grand totals, then Analysis menu > totals > column totals to top)

We’ve done this as we need the additional row at the top of the chart to align with the ‘No Comparison’ option in the selector we’ll build, but we don’t want the bar to show. To get rid of it, click on the bar and then select Hide from the ‘automatic’ drop down

which gives us

Hide the Sub-Category row heading and axis (uncheck show header from the pills). Remove all gridlines, row/column dividers and axis rulers/zero lines etc.

We’ll come back to this sheet later.

Building the selector sheet

We’re going to build this using a dual axis of a bar chart and a shape.

On a new sheet, add Sub-Category to Rows and again sort by Sales descending.

Double click into Columns and type MIN(-1.0)

Change the mark type to bar and widen each row a little. As before, add Column Grand Totals to the top.

Create a new field

LABEL: Sub Cat

IF MIN([Sub-Category])<>MAX([Sub-Category])
THEN “No Comparison” ELSE ATTR([Sub-Category])
END

If we just add Sub-Category to the label, the grand total row will show as ‘All’. The above is a sneaky way to change the word ‘All’, as in the ‘grand total’ row, all the Sub-Categories are ‘known about’, so the MIN(Sub-Category) and MAX(Sub-Category) are different.

Add this field to the Label shelf, and align left centre (the axis is -ve, so the alignment has to be to the left, even though it’s displayed on the right).

We need to be able to identify which row (including the grand total row) has been ‘selected, so create

Is Selected SubCat

ATTR([Sub-Category]) = [pSelectedSubCat] OR ([pSelectedSubCat]=” AND [LABEL: Sub Cat ] = ‘No Comparison’)

And add this to Colour, and colour the True to match the bar chart colour you chose, and Null and False to white (so it ‘disappears)

Now create a secondary axis by double clicking into Columns and type MIN(-0.9). Change the mark type to Shape. Remove Label: SubCat from the marks card. Create a duplicate of Is Selected SubCat so you have Is Selected Subcat (copy) and add this field to shape and to Colour and set the colour and shape as required

Make the chart dual axis and synchronise the axis. Hide all the axis and the row headings and remove all row/column dividers, gridlines etc.

Building the dashboard and adding the interactivity

Create a dashboard and using a horizontal layout container arrange the Selector sheet and the Bar sheet side by side, ensuring both ‘fit entire view, which will make sure the rows all align with each other.

We need to change the values of the pSelectedSubCat and pSelectedSales parameters on click of either chart. When we do this, we need to pass the relevant values into the parameter. Because we also have to handle the ‘grand total’ row, we need some additional fields for this

Sub Cat for Param

IIF([LABEL: Sub Cat ]=’No Comparison’,”,ATTR([Sub-Category]))

ie use ‘nothing if the ‘grand total’ is clicked, otherwise use the Sub-Category

similarly

Sales for Param

IIF([LABEL: Sub Cat ]=’No Comparison’,0,SUM([Sales]))

ie use 0 f the ‘grand total’ is clicked, otherwise use the Sales value of the Sub-Category

Add both these pills to the Detail shelf of the All marks card on the Selector sheet, and to the Detail shelf on the Bar sheet.

On the dashboard, create a dashboard parameter actions

Set Sales Value

On select of either sheet, set the pSelectedSales parameter, passing in the value from the Sales for Param field aggregated at the SUM level. Set to 0 when selection cleared.

Set Sub Cat

On select of either sheet, set the pSelectedSubCat parameter, passing in the value from the Sub Cat for Param field. Set to “” when selection cleared.

Finally, as we are already differentiating the ‘selection’ through different colours, we don’t want the click to ‘hihglight’ the mark. Create a new field

Dummy

“HL”

and add this to the Detail shelf on both sheets

Then create a dashboard Highlight action

Highlight

On select of either sheet, target either sheet but only with the selected Dummy field.

And that in principle should give you a functioning solution. The only extension I made, as to make the Tooltips on the bar chart make sense depending on what was being viewed. This involved building up a series of Tooltip Text fields. Check out my solution if you need to see the details.

My published viz is here

Happy vizzin’!

Donna

Can you visualise and measure distance travelled?

Kyle took inspiration from the 2026 FIFA World Cup for this week’s challenge, looking at how many miles each team need to travel between their base camp and the stadiums where their group matches are being held. He sourced some data which he provided for download.

Modelling the data

The data provided contained 3 sheets. Kyle gave some hints on how he’d used the data, but nothing specific, so I just related the sheets in the following way, to see whether this would be enough.

I related Schedule to Base Camp, but BEFORE I applied the relationship join condition, I pivoted the Schedule data (as Kyle had hinted this may be required). I did this by

  • Adding Base Camp to canvas
  • Then adding Schedule to canvas
  • Then clicking on the Team A and Team B columns in Schedule, and selecting Pivot
  • The renamed Pivot Names field heading to Team A | B
  • and renamed Pivot Values field heading to Team1 (I couldn’t call it Team as this field already exists in Base Camp)
  • I then created a relationship between Base Camp.Team and Schedule.Team1

The add Venues to the canvas a relate to Schedule on the Venue field.

Creating the Map with all locations

For the maps we need to work with spatial data, and need to define the location of each base camp and each venue. The data sets had longitude and latitude fields for both types of location, but for some reason, both the longitude fields were resolving as string fields. So I had to change these to geographic fields by the following steps

  • right click Base Camp > Longitude, and change data type > number (decimal)
  • then right click field again , geographic role > latitude
  • repeat same 2 steps for the Venues > Laitude (Venues) field.

Once done create fields

Base Location

MAKEPOINT([Latitude],[Longitude])

and

Venue Location

MAKEPOINT([Latitude (Venues)],[Longitude (Venues)])

Then create

Line

MAKELINE([Base Location],[Venue Location])

and then

Distance – Base to Venue

DISTANCE([Base Location], [Venue Location],’mi’)

On a new sheet, add Venue Location to Detail, and Venue to Detail. Change the mark type to circle. Adjust the map background layers so only the Base, County/Region Names and State/Province border options are selected (Map menu > background layers)

Create a parameter to store the name of the selected team we want to focus the data for

pTeam

string parameter defaulted to ‘Austria’

Create a field

Is Selected Team?

Team = [pTeam]

Add this to Colour and Size and adjust accordingly. Make sure the ‘true’ is listed first so that the marks for the selected team are ‘on top’ . This will require the Size to ‘be reversed’

Remove all text from the Tooltip

Drag Base Location onto the display and drop it when ‘Add a Marks Layer’ option appears, which will create a 2nd marks card

Drag this card to be beneath the Venues one. Change the mark type to circle. Add Team to Detail. Add Is Selected Team to Colour and Size. Add Training Site and City to Tooltip and update accordingly.

Then click on the context menu of the Venues marks card, and disable selection

Nowt drag Line on to the canvas to make another marks layer. Again move this marks card to the bottom of the list, so it’s beneath the Base Camp marks card. Add Team to Detail and Is Selected Team to Colour. Create a copy of Is Selected Team (right click field and duplicate to create Is Selected Team (copy)) and add this to Size and adjust. I found I needed a copy so I could have different sizes between the circles and the lines Add Training Site and Distance to Tooltip and update the Tooltip accordingly. Remove row & column dividers.

Creating the ‘Team specific’ map

The easiest way I found to do this initially, was just to duplicate the sheet with the above map, and then add Is Selected Team to the Filter shelf, and set to True. This gives us the display we need, but tooltips need changing.

Re-enable the Venues marks card. We’ll need to display information about the match on the venues tooltip, wihich includes details for the teams playing.

As we initially pivoted the data, this information is now across 2 rows, so we need to create fields to capture both the teams on each row. I used FIXED LoDs for this:

Team A

{FIXED [Match]:MIN(IF [Team A | B]=’Team A’ THEN [Team_1] END)}

Team B

{FIXED [Match]:MIN(IF [Team A | B]=’Team B’ THEN [Team_1] END)}

Add these to Tooltip, along with Training Site, Date, Time (Local) and Distance. Format the Date field to “Month, Day Year” format, and custom format the Time (Local) field to h:nn AMPM. The adjust tooltip to suit.

Now do similar to the Line marks card – add Match to the Detail shelf as a blue disaggregated discrete pill, and then add Team A, Team B, Venue, Date and Time(Local) to the Tooltip and update accordingly.

Create the Bar Chart

On a new sheet, add Is Selected Team and Team to Rows and Distance to Columns. Sort descending. Order so Is Selected Team : True is listed first.

Make the rows a little wider. Add Is Selected Team to Colour. Add Team to Label. Adjust Label so the team name is aligned left and coloured in white bold text. Adjust the Tooltip. Add a Reference line to the Distance axis to show per cell the value of the sum of the distance. Don’t show line or tooltip.

Format the reference line, so the numbers are aligned in bold font, middle right

Hide the Is Selected Team, Team and Distance headers & axis (right click pill > uncheck show header). Then remove all row/column dividers and gridline, axis rulers etc.

Finally create 2 fields

True

TRUE

False

FALSE

and add these to the Detail shelf (we’ll need them later to ensure the bar doesn’t highlight when we select values).

Creating the match cards

On a new sheet, add Is Selected Team to Filter and set to true.

We need to identify which match is match 1st, 2nd and 3rd. I did this using the dates, but in hindsight could have used the Match field which just contains an unique number per match… anyway…

Match 1 Date

{FIXED [Team_1] : MIN(Date)}

Match 3 Date

{FIXED [Team_1] : MAX(Date)}

Match No for Team

IF [Date] = [Match 1 Date] THEN ‘Match 1’
ELSEIF [Date] = [Match 3 Date] THEN ‘Match 3’
ELSE ‘Match 2’
END

Add Match No for Team to Filter and set to Match 1.

Chang the mark type to shape and set to use a transparent shape (see here for more details on this). Then add Match No for Team, Match, Venue, City (Venues), Distance, Date and Time (Local) to Label. Format the date and time field as you did above.

Create a field

Opponent

IIF([Team_1]=[Team A],[Team B],[Team A])

and add this to Label too. Then adjust the label as required, and align middle left. Don’t show tooltips.

Duplicate this sheet and change the filter to select Match 2 for match 2, and then repeat for Match 3 so you have 3 separate sheets for the matches.

Creating the ‘team’ sheet

On a new sheet, add Is Selected Team to Filter and set to True. Set the mark type to shape and use a transparent shape. Add Team, Distance, Training Site and City to Label and adjust and format accordingly, aligning left middle. Don’t show tooltips.

Building the dashboard and adding the interactivity

I set the background of the dashboard to dark grey and then used layout containers to organise the content, using padding and rounded corners to style as required. The layout of my dashboard is pictured below. It will take some time to get this layout just right, and you might find that in Desktop some text doesn’t display but will when published on Public.

Add a parameter dashboard action to change the team when the bar chart is clicked on

Set Team

on select of the bar chart sheet, set the pTeam parameter with the value from the Team field.

To prevent the selected bar from being ‘highlighted’ when clicked, add a dashboard filter action

Deselect Bar

On select of the bar chart on the dashboard, target the bar chart sheet directly, setting fields true = false.

And that should be it.! My published viz is here

Happy vizzin’!

Donna