Dynamically Set the Reference Line and Label on a Widget

You can dynamically set a reference line and its label based on a measure from a query. For example, you can set the reference line to represent the sales target and then compare it against your won opportunities.

You can create dynamic reference lines without code. Learn more about creating reference lines.

In this example, let’s say you have a timeline chart that shows the total opportunity amount over time. The dashboard also contains a list selector that allows you to show the total amount for a particular account. To compare the total for each account against the average for all accounts, you want to set a reference line based on the average opportunity amount for all accounts.

The timeline chart shows a reference line with a label and value.

To create the reference line label and its value based on the average for all accounts, add interactions in widget properties for the timeline chart (chart_3) as follows.

In this example, the interaction gets the average from the query (all_1), which calculates the average in the number widget based on the selected account name in the list widget.

For more interaction examples, create the CRM Analytics Learning Adventure app in your org.