Parameter Actions: Concatenation

Filippos Lymperopoulos
Jul 8 · 4 min read

Join Tableau’s 19.3 pre-release to experience the latest Parameter Action enhancements.

In 19.2 we shipped Parameter Actions and we have been inspired by the community’s creativity and feature adoption. In 19.3 we are introducing three new aggregation methods (first quartile, third quartile, and string concatenation), as well as a new “Create New Parameter…” shortcut right in the Actions dialog. These enhancements allow you to answer more questions and improve your analytical authoring flow.

In this short blog post we will briefly recap the fundamental difference between Set and Parameter Actions and see how the new concatenation aggregation method can bridge the gap between the two. Concatenation refers to the operation of joining strings with a delimiter separator between each string value.

Let’s go.

Recap of Set and Parameter Actions

Sets are well-defined in a single data source. With Set Actions you can select what values from the field(s) that defined the set are IN the set.

Parameters are well-defined workbook constants. With Parameter Actions you can select values from any field of any data source and assign that value to a parameter. As shown below, this can be a single row’s field value (Sales), or the result of an arbitrary calculation. The latter can be as simple as aggregating multiple rows (Profit), appending and prepending values with a character (*), or evaluating the result of a table calc (window_sum(SUM[Sales]), first(), last()) and storing it in a parameter.

Parameters can be flexibly used across datasources, however, they are always a single value. Sets can take multiple values but they are bound to a single datasource. Therefore, asking relationship questions across data sources is challenging, at best. Jonathan Drummey has published a very informative post on sets and blending that approximates that challenge. But what if I told you that in Tableau 19.3, with parameter actions “cross-DS sets” are only a click away?

Concatenation: A New Hope

In the schematic that follows I select two marks. I have setup a Parameter Action that targets “Param B” and assigns to it the State values visually selected. Because “Param B” is a single-value constant, I need to aggregate the State values selected. Instead of picking the alphabetic min (MA) or max (NJ) value of the selected States, I want to keep both State values in the parameter by concatenating them.

This selected set of State values is now stored in “Param B” and can be referenced in calculations in any data source. Why should you care?

Let’s look at an example using two simple data sources: one contains a list of clients and their phone numbers, while the other contains my company’s sales broken down by customer, product, region, and date of purchase.

I do not want to blend and establish relationships between fields in my datasources, neither do I want to join the two tables. I simply want to define a set of values that I care about and fluidly use that set of values across data sources. I will first put together a source sheet showing all my clients from the phone directory and create a parameter action that stores my selection’s values.

This is manifested by a new dropdown option in the parameter action dialog.

When I connect to the Sales table, I can write a calculation that checks each row to see if that row’s “Customers” value is in “Selected Clients.”

This calculation returns True or False, effectively resembling a set. We can place it on color and see what selected clients from the Phone table have purchased in the Sales table.

We can create as many “Contains” calculations as data sources we want to query using the input client list. As the diagram below shows, we can use the concatenated list of values (“Selected Clients”) and create Customer sets in different datasources (“sales directory,” “deals closed,” “partnerships”) based on the appropriate customer field in each data source (Customers, Leads, Partners, respectively).

I hope this gave you a good sense of the power this new enhancement offers. As always, feel free to reach out with any questions and keep on sharing the great vizes you build with #ParameterActions ❤

    Filippos Lymperopoulos

    Written by

    Product Manager @tableau; formerly @edXOnline and @ericsson | @OlinCollege

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade