Forum Discussion

wwang's avatar
wwang
Qrew Member
4 months ago

Line Chart drops to 0 on missing dates (Sparse Data) - How to interpolate?

I am trying to plot a Risk History line chart over time. I want the line to connect from the last known value to the current value, bridging the gap over dates where no record exists.

The Setup:

Table: Risk History (Child table)

Fields: [Snapshot Date], [Risk Name], [Risk Score]

Data Structure: The data is "Sparse." I only have a row for a specific date if a snapshot was taken for that specific Risk.

Example: Risk A has rows for Jan 1 and Jan 5. Risk B has a row for Jan 3.

The Problem: When I use a standard Line Chart, the X-axis includes "Jan 3" because Risk B has data there. However, because Risk A has no record for Jan 3, the chart forces Risk A’s value to 0 (or null), causing the line to plummet to the bottom and then shoot back up on Jan 5.

What I’ve Tried:

Filtering: I tried filtering the report to [Risk Score] != 0 or null. This didn't work, presumably because there is no record to filter; the chart engine is generating the "0" because the data is missing.

Scatter Plot: I switched the chart type to a Scatter Plot, The 0 value still shows. 

 

My Question: Is there a native setting in the Line Chart to "Connect line segments across missing values" or to ignore missing categories instead of treating them as zero?

Or is the only solution to change my data strategy to "Dense Snapshotting" (using a Pipeline to create a row for every active risk every single day)?

Thank you 

2 Replies

  • My suggestion is to use a bar chart format. 

    Note that with Many Chart Types like line and bar charts, there will be a legend at the bottom for the series values, for example, your risk types. Hovering over one of those will highlight that particular risk type and kind of fade out the other risk types so you can both see all the Risk together, which might be a little jumbled, but you can also easily do a hover over Risk A and see the bars just for Risk A.

  • I've actually circumvented this by using a formula field that returns a null value, rather than filter on a null value. Hopefully that makes sense!