Spotfire® Web Client User Guide

Column from marked

The Column from marked functionality is a way to look up which column to assign to a column selector by fetching the column name from a cell value in a data table, using marking. The cell would then contain the name of the column you want to assign to an axis in a visualization, such as what to use on the X-axis or what to color by.

Right-click the axis selector of the axis of interest and select Column from marked from the opened menu.

You use the Column from marked functionality when you want to update the visualization iteratively and quickly set another column for the property. Once Column from marked has been configured, pointing to a new cell by marking a row updates the axis. If you only want to configure a visualization to use a certain column, you should not use the Column from marked functionality.

See Column from marked - examples for more information.

Note: When the Column from marked functionality has been switched on, it will be used to continuously update the visualization until it is switched off. This means that any other configuration that you try to apply to the visualization will be lost each time the marking changes.

When configuring the functionality, you select:

  • the data table containing the column with all column names
  • the column itself
  • the marking that should define what to show on the axis (if more than one item is marked, the first item will be used to define the value to use on the axis)

Expression

By default, the expression used is the plain cell value as specified by the input fields at the top of the Column from marked dialog.

A suitable aggregation method is automatically selected depending on the type of axis in the visualization. The text "Sales 2022" can therefore be interpreted as [Sales 2022] on the Y-axis of a scatter plot, as Sum([Sales 2022]) on the value axis of a bar chart and as <[Sales 2022]> on a categorical category axis of a bar chart.

However, if you want to have more control of how values should be interpreted, you can choose Advanced, and extend the default expression to include additional columns and/or apply aggregation methods.

The {0} variable refers to the value defined by the three input fields in the dialog (the plain cell value) and the cell value is automatically escaped to a column expression by the addition of straight brackets. The expression can be extended using the same syntax as custom expressions.

If additional columns are specified, these will show up as individual column selectors for the visualization property (axis) once the Column from marked functionality has been applied.

Examples:

The expression {0}, [Sales 2023] applied on a continuous column containing the column names "Sales YearX" would result in two columns (where the second one always is Sales 2023) on the axis: [Sales 2022], [Sales 2023] or [Sales 2021], [Sales 2023], etc., depending on what year was marked.

The expression Sum({0}) would result in the expression Sum([Sales 2022]) (with varying years depending on what you mark), hence, an aggregated, continuous column on the axis.

The expression Sum({0}) over AllPrevious([Axis.X]) would result in the expression Sum([Sales 2022]) over AllPrevious([Axis.X], hence, a cumulative sum on the axis.

The expression <{0}> used with a categorical column containing genders could result in the expression <[Male]>, <[Female]> or <[Non-binary]> on the axis, depending on what was marked.

The expression <{0} nest [Product]> with a categorical column containing the values On or Off would result in the categorical hierarchy <[On] nest [Product]> or <[Off] nest [Product]> on the axis, depending on what was marked.