User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

Pinned Values and Formulas

Pinned values in Data Stories enhance your visualizations by highlighting essential data points, facilitating comparisons, and enabling customization through unique formulas. They help you craft meaningful insights, serving as bookmarks for key data points that you can refer back to or utilize in calculations.

Pin values

Pinned row values cannot be selected directly within the visualization editor. They can only be used within the Pinned Values tab for creating formulas.
  1. For the visualization you’re currently working on, open the Pinned Values tab from the left-side menu.

    If no pinned value has been assigned yet, the tab is empty. Otherwise, it shows all pinned values for the current visualization, including the name, value, and associated attributes (in case you choose to Pin row values).

    advanced features pinned values formulas pin values pinned values tab empty
  2. Hover over the value you want to pin within the Metrics or Dimensions column and open the three dots menu.

    advanced features pinned values formulas pin values dimension metric three dots
  3. Here you can select:

    advanced features pinned values formulas pin values pin a value more options menu
    1. Pin value - The value is saved to the Pinned Values tab and its name is prefixed with a dollar sign ($).

      For easier reference, you can rename the value at any time: select it and enter your preferred name instead.

      advanced features pinned values formulas pin values change name pinned value
    2. Pin row values - All values from the row selected are saved to the Pinned Values tab and the name is prefixed with a dollar sign ($).

      For easier reference, you can rename the value at any time: select it and enter your preferred name instead.

      advanced features pinned values formulas pin values pin row value
To unpin a value, click the trash icon next to the relevant pinned value.

Examples

Profit margin pinning

Let’s say you’re analyzing a visualization of different products' sales figures. Within the Metrics column, you find the profit margin for Product A to be significantly high.

You can hover over this profit margin, and in the three dots menu choose Pin value. This pinned value is automatically saved as $profit_margin1, but you can rename it to $ProductA_Margin for clarity.

Sales and costs row pinning

For Product B, you want to save both sales and associated costs for comparison in future formulas.

Hover over the row containing these values, and in the three dots menu select Pin row values. The row values are saved as $sales_productB and $costs_productB respectively on the Pinned Values tab.

Create formulas

  1. For the visualization you are currently working on, open the Pinned Values tab from the left-side menu.

    advanced features pinned values formulas formulas add formula
  2. Select Add formula.

  3. Enter a formula name and a custom definition using standard mathematical operators.

    The definition must follow this format: $name.attributename. You can then include the operators for the desired operation.

    By default, the name of the formula is prefixed with a hashtag (#).
    advanced features pinned values formulas formulas add formula type formula
  4. Select Evaluate. The formula is added to the list on the Pinned Values tab and the result of your calculation is displayed under it.

    You can edit this formula at any time: select the pencil icon and provide a new definition.

Examples

Profit calculation

After pinning sales and cost values for Product B as $sales_productB and $costs_productB, you decide to calculate the profit.

  • Select Add formula.

  • Name it Profit_ProductB.

  • Enter the definition: $sales_productB - $costs_productB.

  • Select Evaluate. The result displays the profit for Product B.

ROI calculation

Suppose you’ve also pinned an investment value for a marketing campaign as $investment1. To determine the Return on Investment (ROI) using the profit from Product B:

  • Select Add formula.

  • Name it ROI_ProductB.

  • Enter the definition: ($Profit_ProductB / $investment1) * 100.

  • Select Evaluate. The result displays the ROI percentage for Product B based on the marketing campaign’s investment.

For more details and additional examples of the operators you can use in your formulas, see the math.js syntax documentation.

Was this page useful?