Anomaly Insight past ndays for specified date granularity

Within the ML-powered insight for anomalies the date selection seems limited to daily,weekly,monthly,quarterly,yearly. Is it possible to have past ndays within the narrative?

At present the date granularity of the date field determines the start and end dates as well as the aggregation. I.e. daily means start will be yesterday and end will be today. Is it possible to change or use a parameter in place of this? I want to be able to display anomalies and the insight on a daily level but for the past 7 days.

Changing the date field to weekly aggregation, results in insight aggregating at that level (weekly) and compares the past week to present. Same for daily at a daily level. I can see the start and end date fields in the computation section of edit the narrative but these are not customizable.

Is there a solution or known work around?
thanks

Hello @bpage1 , welcome to the Quicksight community!

My suggestion would be to try using the narrative editor and a function like periodOverPeriodLastValue:

Let me know if this is what you were looking for!

Thanks @duncan!

The periodOverPeriodLastValue isn’t exactly what I’m looking for. The computation seems fine in generating results similar to what is expected when I select date granularity as DAY. The issue is I can only show the most recent observable date an anomaly was detected in the narrative, I want to show a range, past ndays.

But, I want to show results in the narrative for past 7 days on a daily level of granularity. Using TopMovers insight there is startTimeValue (Mar 3, 2024) and endTimeValue (Mar 4, 2024) which I assume are determined by the date granularity selected from the field wells, I also assume this is the case with the Anomaly insight. What I want is to expand the time horizon without changing the aggregation from daily to weekly. So instead of having startTimeValue relative to the date granularity is it possible to set it to a parameter of trailing ndays and have each of the 7 days called out as an “anomalydate” rather than just the endTimeValue?

I understand TopMovers and anomaly are not the same, I use it to try and provide some context. Anomaly only has timeValue available in the narrative.

Hey @bpage1 !

This specific use case is not be supported by the UI, but maybe I am misunderstanding what you’re desired outcome for the anomaly detection insight would be.

Do you want the insight to find anomalies for each of the last 7 days of your target field? If this is the case it might be better to build a custom narrative that measures the Min and Max of each day based on a target field and a partition for the group by.

Hello @bpage1!

Were you able to find a workaround for this or find a new solution? Again I don’t believe this specific use case is supported but you could try doing this using Max/Min for each day based on a your target field.