Horizontal Line Limitations in Lines & Curves

  • Are you struggling with the limitations of Horizontal and/or Vertical lines in Lines and Curves?
  • Do you want a horizontal line to move with time but can’t figure out how?
  • Are you trying to limit the horizontal line?

Background:

I recently worked on a project analyzing safety data for the current and previous years.  Four key metrics were used to evaluate performance, and each metric had a target for the current and previous year.  The actuals were housed in data tables and the targets in property controls.  I wanted to use the Horizontal Line feature in Lines and Curves to display the target, but I kept getting something that looked like this….

Horizontal Line

 

Problem:

The problem is that I have a target for 2016 and a target for 2017, but when the Horizontal Line feature is used, both targets span the entire date range.  I need to limit the horizontal line to a specific year. Thus, how do I  get the lines to stop and start as desired?

Now, I feel like I know most of what there is to know about lines and curves.  I’ve authored posts on how to use all of lines and curves (links below), and I’ve used lines and curves a lot.  Therefore, I reached out to TIBCO support to make sure there wasn’t some way of limiting the horizontal line that I wasn’t aware of.

General Summary of Lines & Curves

Line from Column Values

Line from Data Table

Curve Draw

Curve from Data Table

Solution:

I was correct in that there was no way to limit the horizontal line.  To get this to work, we used a calculated column as a workaround.  I created a calculation that referenced the date on the X-Axis (and my property control of course), so that the target would populate for the year it applied.

If(Year([Date])=[Current_Year],${CurrentYearTarget}, NULL )

Since I had two targets, I created two calculated columns and then added them on the Y-Axis, rather than as horizontal lines.  This was the end result.  It wasn’t the ideal solution, but it was a solution.

 

Horizontal Line

Guest Spotfire blogger residing in Whitefish, MT.  Working for SM Energy’s Advanced Analytics and Emerging Technology team!

Leave a Comment

Your email address will not be published. Required fields are marked *