Rules
Anomaly Formula: Percentage-By-Average
What it does:
This rule compares the most recent value with the average (mean) of your historical usage. If the percentage difference between the latest and the average meets or exceeds your threshold, and the direction of change matches your selected change type, an alert is triggered.
When to use it:
Use this formula when you want to detect unexpected jumps or drops in usage relative to your typical average behavior. It’s ideal for identifying deviations from your regular spending pattern.
Examples
✅ Example 1: Strong Increase Triggers Alert
- Anomaly Formula: PercentageByAverage
- Change Type: Increased
- Threshold: 30
- History: 90, 95, 100, 92, 91, 130
- Explanation:
- Average (before latest) = 93.6, latest = 130
- Percent change = ((130 – 93.6) / 93.6) * 100 ≈ 38.9%
- Increase is above threshold → ✅ Alert triggered
❌ Example 2: Decrease But Below Threshold
- Anomaly Formula: PercentageByAverage
- Change Type: Decreased
- Threshold: 25
- History: 80, 82, 83, 81, 80, 75
- Explanation:
- Average = 81.2, latest = 75
- Percent change = ((75 – 81.2) / 81.2) * 100 ≈ -7.63%
- Drop is below threshold → ❌ No alert
✅ Example 3: Large Drop Triggers Alert (Change Type = Any)
- Anomaly Formula: PercentageByAverage
- Change Type: Any
- Threshold: 50
- History: 100, 110, 90, 105, 95, 40
- Explanation:
- Average = 100, latest = 40
- Percent change = ((40 – 100) / 100) * 100 = -60%
- The drop exceeds threshold and “Any” allows all changes → ✅ Alert triggered