{{ metric.name }}
Metric definition details and configuration
Metric Overview
{{ metric.name }}
{{ metric.description|default:"No description provided" }}
{{ metric.get_category_display }}
{{ metric.get_metric_type_display }}
{{ metric.unit|default:"N/A" }}
{{ metric.format|default:"Default" }}
{% if metric.data_source %}
{{ metric.data_source.name }}
{% else %}
Not specified
{% endif %}
{{ metric.get_calculation_frequency_display|default:"Manual" }}
{% if metric.status == 'active' %} Active {% elif metric.status == 'inactive' %} Inactive {% else %} Draft {% endif %}
{{ metric.calculation_count|default:"0" }}
Calculations
{{ metric.widget_count|default:"0" }}
Widgets
Formula & Configuration
Calculation Formula:
{% if metric.formula %}{{ metric.formula }}
No formula defined for this metric.
{% endif %}
SQL Query:
{{ metric.sql_query }}
Parameters:
| Parameter | Type | Default Value | Description |
|---|---|---|---|
{{ param.name }} |
{{ param.type }} | {{ param.default_value|default:"N/A" }} | {{ param.description|default:"No description" }} |
Current Value & Trends
Current Value
{{ metric.current_value|default:"N/A" }}
{% if metric.unit %} {{ metric.unit }} {% endif %}
{% if metric.change_percentage %}
{{ metric.change_percentage|floatformat:1 }}%
vs last period
{% endif %}
Last calculated: {{ metric.last_calculated|timesince }} ago
Calculation time: {{ metric.calculation_duration|default:"N/A" }}
Calculation History
{% if metric.calculation_history %}
{% else %}
{% endif %}
| Date | Value | Status | Duration | Triggered By | Actions |
|---|---|---|---|---|---|
| {{ calculation.calculated_at|date:"M d, Y H:i" }} | {{ calculation.value }} {% if metric.unit %} {{ metric.unit }}{% endif %} | {% if calculation.status == 'success' %} Success {% elif calculation.status == 'error' %} Error {% else %} Pending {% endif %} | {{ calculation.duration|default:"N/A" }} | {{ calculation.triggered_by|default:"System" }} |
No Calculation History
Calculation history will appear here after the first calculation.
Quick Actions
Metric Information
{{ metric.created_by|default:"System" }}
{{ metric.created_at|date:"M d, Y H:i" }}
{{ metric.updated_at|date:"M d, Y H:i" }}
{{ metric.version|default:"1.0" }}
{% if metric.tags %}
Related Widgets
{% if metric.related_widgets %}
{% else %}
{% endif %}
No widgets using this metric
Performance
{{ metric.avg_calculation_time|default:"N/A" }}
Avg Calculation Time
{{ metric.success_rate|default:"N/A" }}%
Success Rate
{{ metric.data_freshness|default:"N/A" }}
Data Freshness