While reference lines in SAS Visual Analytics are static by default, VA also supports dynamic reference lines driven by parameters. This article explains how to create one step by step.
To create a reference line, you first need a visual object, such as a bar chart, butterfly chart, dot plot, line chart or many others to which the reference line will be applied. Once the object is selected, open the Options pane and navigate to Reference lines. Using the + New reference line option, you can create a reference line for the selected object. At this stage, the reference line is static and based on a fixed value.
To convert a static reference line into a dynamic one, expand the Value section of the reference line settings. Instead of entering a fixed numeric value, choose + New parameter.
SAS Visual Analytics allows you to define parameters in several ways. In this case, you can take advantage of a relatively new capability: expression‑based parameters. These parameters are driven by expressions rather than manual input, making them ideal for dynamic analytics.
An expression-based parameter can be very simple or more complex, depending on your needs. A common example is calculating the overall average of a measure used in the chart. This ensures that the reference line automatically updates whenever the underlying data changes.
Once the parameter is defined, it becomes the value source for the reference line, turning it into a truly dynamic element of the visualization.
After creating the dynamic reference line, you can modify its properties — such as color, line style, or thickness—to make it more visible and distinguishable from the data itself. This helps users immediately recognize the benchmark represented by the line.
Parameters canbe reused in text objects, which makes it possible to create dynamic labels or titles.
For example, the same parameter used for the reference line can be inserted into a text object to display a dynamic title that reflects the current benchmark value. This improves report clarity and ensures consistency between visuals and explanatory text.
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.