I have multiple scatter plots which i have filtered by date (last 30 days). The annoying thing is that it will filter the data by the last 30 days, but the starting date won’t be from 30 days ago. The starting date is decided by the first data point found in the last 30 days.
For example i have one scatter plot which starts on September 30th which is correct. This one has a lot more data points plotted. My other scatter plot has maybe half the amount of data points plotted, as it has a lower occurrence. However since there is less data points, there isn’t one for the September 30th. Instead it is starting at October 4th (which i assume is the first data point for that filter). How can i have it so the starting date will always SHOW the date 30 days ago. In this example all of my scatter plots should show September 30th as start date, but there may be no data points plotted for it. See below screenshots.
Hi @HarveyB-B I would recommend writing a calculation that is based on today’s date and measure back 30 days from that. Something like:
ifelse(dateDiff({your date field}, now())<=30, 1, 0)
That field is going to return 1 or 0. Add a filter on this field and set it to equals 1.
Does that work for you? Im going to mark this as resolved but feel free to reply and unresolve it if its not behaving how you want.
I applied what you said, however when i filter the table by this new calculated field, and have it set to 1, the dates do not change. Instead they are still set to the last date where a data point is.
I see - I misunderstood your question earlier. If there is no data on the day from 30 days ago, then the axis will always start wherever the first datapoint is. Unfortunately on scatterplots there is currently no way to force it to extend the axis to 30 days back if there is no data there. This is a good suggestion and I will tag this post as a feature request for the product team to look at.
One alternative is to use a line chart and then we turn off the lines and add markers to show dots. Line charts allow us to say how many points to display, but it is always backwards from the LAST datapoint. If your two visuals at least have a datapoint on the last day int he range then this might work for you.
Format Data Series: