Using a formula visualization

Contents[Hide]

1. Overview

This walkthrough shows you how to use a Formula Visualization and display the result in a Data Label.

For example, suppose you have a Bar Chart that shows the List Price of each product, and you want to display the Average List Price on a Data Label control.

A bar chart
A bar chart

Related video: Working with Formulas

2. Add the Formula Visualization Control

From the toolbar, click Data Visualization and select Formula Visualization.

Select Formula Visualization from the toolbar
Select Formula Visualization from the toolbar

In the formula bar, type the first letter of the formula function and select the appropriate entry from the list of available functions.

Select the AVG function
Select the AVG function

Type a dollar sign character ($) and select the control from the list the available Data Visualization controls.

Select chart1
Select chart1

Note

Type a period character (.) and select the metric set from the list the available metric sets.

Select MetricSet1
Select MetricSet1

Type a period character (.) and select the measure from the list of available measures.

Select list_price
Select list_price

Type ) after the last dollar ($) sign to complete the formula and click apply.

Type closing bracket and click apply
Type closing bracket and click apply

Note
Some formulas require parameters. Check the specific syntax of the formula you are using from the List of formulas page.

Tip
You can click on the data point (for example, click on the bar in the Bar Chart) to auto-populate the measure instead of Steps 3 to 5 above.

2.1. Result

Regardless of the type of Data Visualization you are using, the result of the Formula Visualization is displayed by default in a tabular format.  

Table visualization shows the result of the formula
Table visualization shows the result of the formula

2.2. Re-visualize to a Data Label

To display the average in a Data Label control, you can do the following:

  1. Right-click the Data Visualization and select Re-Visualize.
  2. Select Data Label
  3. Add a Label component with the text Average:.
     

3. Add a placeholder parameter

You can introduce a new parameter as a placeholder in the formula, which you can then connect to a filter or view parameter. For example, in the above-created data label, open the Data Analysis Panel and edit the formula.

Edit the formula from the Data Analysis Panel
Edit the formula from the Data Analysis Panel

Add an offset placeholder to the formula expression and click apply. The placeholder can be any text but has to be surrounded by dollar ($) signs.

Add a placeholder to the expression
Add a placeholder to the expression

Add a Single Number filter and connect it to the new SingleNumber parameter.

Add a Single Number filter and connect the parameter
Add a Single Number filter and connect the parameter

Change the filter label text to Offset.

Switch to View mode and change the filter value, the Data Label will change accordingly.

View the result and change the filter value
View the result and change the filter value

Note
The parameter is created as a Single number type by default. To change the parameter type, edit the formula expression, click the placeholder to provide more information, and then click Parameter Placeholder Properties.
 

4. See also

 

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri