<@U088WCP3B4P> How can I check if a KPI stays in a...
# ask-elementary-ai
f
@kapa.ai How can I check if a KPI stays in an acceptable range over time ?
k
A message from kapa.ai
To check if a KPI stays in an acceptable range over time using Elementary Data, you can use their anomaly detection tests. These tests are designed to monitor metrics over time and alert you when values fall outside of expected ranges. ## Using Elementary's Anomaly Detection Tests Elementary offers several types of anomaly detection tests that can help monitor your KPIs: 1. Column Anomalies Test: This test monitors specific metrics like averages, sums, or other statistical measures of your KPI column. 2. Volume Anomalies Test: If your KPI is related to data volume or counts, this test can detect unexpected changes. 3. Dimension Anomalies Test: This allows you to monitor KPIs grouped by specific dimensions (like store, market, etc.). The anomaly detection works by: - Splitting your data into time buckets - Using historical data as a training set to establish expected ranges - Comparing recent values to these expected ranges - Alerting when values fall outside the expected range [How Anomaly Detection Works](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works) ## Configuration Options You can customize the sensitivity and behavior of these tests: - Time Bucket: Define the granularity of your analysis (daily, hourly, etc.) - Training Period: How far back to look for establishing normal patterns - Detection Period: The recent period to check for anomalies - Sensitivity: Adjust how sensitive the test is to deviations For example, if you want to monitor a KPI like median wait time per client, you could use a dimension anomaly test with client_id as the dimension. ## Alternative Approach If you know the exact acceptable range for your KPI (rather than wanting to detect anomalies based on historical patterns), you might consider using a range test like
dbt-expectations#expect_column_values_to_be_between
which can be integrated with Elementary's monitoring dashboard. Elementary's upcoming CLI version update will also provide better visualization of column anomalies, which will make it easier to see trends and acceptable ranges for your KPIs. Remember that Elementary will soon release improved visualizations for column anomalies that will make it easier to see the trends and acceptable ranges over time.
f
How can I use Dimension Anomalies Test: This allows you to monitor KPIs grouped by specific dimensions (like store, market, etc.). with the sum of a column ?
n
@kapa.ai @Florian Dawans How can I use Dimension Anomalies Test: This allows you to monitor KPIs grouped by specific dimensions (like store, market, etc.). with the sum of a column ?
k
A message from kapa.ai
New message text here