Using set actions to allow user to click on a bar chart in a different color

We begin with a bar chart...

▼Sub-Category pill > Create > Set > Select from list > Check an item > OK

 Select “Art” > OK

Drag the Sub-Category Set pill to the Color shelf:

Right-click the Set pill > Show Set:

Worksheet > Actions > This sheet > Add Action > Change Set Values…

Name the action > Source Sheets to be the current sheet > Run action Select > Target Set to be Sub-Category Set > Running the action will Assign values to set > Clearing the selection will Keep set values

So now, if I click on Accessories or anything else, it gets highlighted in blue.

To switch off the graying out:

Create Calculated field > Name it Dummy > ‘Michael’ (Put in any string)

Drag the Dummy pill to the Detail shelf:

Worksheet > Actions > This sheet > Add Action > Highlight…

Name it “Remove Unwanted Highlighting” > Run action Select > Source sheets to be Set Actions Intro > Target Sheets Set Actions Intro > Target Highlighting to be Selected Fields > Dummy > OK

To add and remove from sets, we need to create two actions. 

First action:

Worksheet > Actions > This sheet > Add Action > Change Set Values

Name: Add <Sub-Category> to the set (this dynamic naming is done using the Insert drop-down)

Source Sheets: Set Actions Intro 

Target Set: Sub-Category Set

Run action on > Menu

Running the action will > Add values to set

Clearing the selection will > Keep set values > OK > OK

So when I click on a bar, I get an option to add whatever I clicked to the set:

Second action:

Worksheet > Actions > This sheet > Add Action > Change Set Values

Name: Remove <Sub-Category> from the set (this dynamic naming is done using the Insert drop-down)

Source Sheets: Set Actions Intro 

Target Set: Sub-Category Set

Run action on > Menu

Running the action will > Remove values from set

Clearing the selection will > Keep set values > OK > OK

Now you can have the option to remove things from the set on a menu:

Author:
Alex Briody
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab