I'm tying to use Lens to plot data changing over a period of time. We generate the data once a week at single point in time, and so it doesn't look good as a time series. We also want to plot the count of a data point known as
version which can have around 15 different values. I'm therefore plotting count of
version as a series (x axis) within a Bar vertical.
I have my initial x series count plot in Lens using the following formula;
count(kql='general.lastContactTime >= "now-30d" and date_iso >= "now-7d"'
date_iso defines when the data capture occurs,
lastContactTime is used to filter the data and drop stale records.
The above is also configured with a Last 30 days date range.
I'm trying to get a second series on the x axis which picks out the previous weeks data as a comparison.
Something along the lines of
count(kql='general.lastContactTime >= "now-30d" and date_iso >= "(now-7d) -14d"'
But that doesn't appear to be a legal query.
Any chance of some guidance on how to structure the second series?