Stacked dismissible alerts with critical / warning pills
Prompt specifications
Tailwind / CSS
Add a "Threshold Alert Banner" stack above the dashboard:
- Each alert is a slim card row: 4px colored left border (critical = red/destructive, warning = accent), a triangle alert icon, an UPPERCASE severity pill, the alert sentence, and an X to dismiss.
- Critical alerts also get a full red border. Order critical first.
- Show a "Restore dismissed alerts" text link when any are hidden.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Threshold Alert Banner":
1. Create measures that return alert text when a rule is broken (e.g. IF [Sales] < 50000 THEN "Jan sales fell below floor").
2. Power BI: a Table/Multi-row card with conditional formatting icons and a severity column; or a Card (new) with alert icons. Tableau: a text sheet filtered to active alerts with shape marks for severity.
3. Severity colors: critical red, warning accent; add an icon so meaning isn't color-only.
4. Place above all visuals; hide when no alerts.
Add an "In-Chart Anomaly Pin" to the trend chart:
- Mark the anomalous point with a 7px red dot with a card-colored outline.
- Attach a small annotation card (shadow, 1px border, 11px text): bold red title "Anomaly · Jan 26", then value, % change vs previous month and a short reason.
- Clicking the pin toggles the note. Keep the main series visually distinct from the anomaly marker.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build an "Anomaly Pin":
1. Flag anomalies with a calc (e.g. sales < AVG − 1.5×STDEV, or Power BI's built-in Anomaly detection on line charts).
2. Tableau: dual axis with a circle mark only where Anomaly = TRUE, colored red; add a Mark annotation with the explanation. Power BI: enable Find anomalies, or add a red data label for the flagged point.
3. Keep the main series in the accent color.
Add an "AI Narrative Insight" block:
- Card with a sparkle icon and an UPPERCASE accent eyebrow "AI insight".
- 2–3 sentence explanation in plain language with key numbers in bold: what happened, when, and why (e.g. seasonal vs structural).
- A "Why? Show drivers" toggle that expands 2–3 bullet drivers and a suggested action.
- Footer right: "Confidence: high" in muted text.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build an "AI Narrative Insight":
1. Power BI: Smart narrative visual (or Copilot narrative) scoped to the trend; edit the text to bold key values. Tableau: Data Stories / Tableau Pulse, or a text box with dynamic fields.
2. Put it next to the chart it explains.
3. Add an eyebrow label "AI insight" in the accent color.
4. Keep to 2–3 sentences; drivers as bullets underneath.
Add a "Driver Analysis Card":
- Title "What moved sales vs prior 6 mo".
- One row per driver: name, a diverging bar from a center line (positive = accent to the right, negative = red to the left), and the impact value with ↗ / ↘ arrow.
- Sort by absolute impact; bars scaled to the largest.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Driver Analysis Card":
1. Power BI: Key influencers or Decomposition tree; or a bar chart of Δ by driver with a 0 axis in the middle.
2. Tableau: diverging bar chart (Δ Sales by driver), color by sign.
3. Positive = accent, negative = red; label values with arrows.
4. Sort descending by absolute change.
Add a "Target Miss Indicator Strip":
- Header: "Monthly target $75,000" left and "N of 12 missed" right.
- A 12-cell strip of equal rounded tiles (32px tall): accent when the target was hit, red at 70% when missed.
- Hovering a tile rings it and updates a caption: "Jan 26: $40,524 · missed by $34,476".
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Target Miss Strip":
1. A highlight table / heat strip: Month on columns, one row, mark type square.
2. Color by calc: Sales ≥ Target → accent, else red.
3. Tooltip shows sales and the gap to target.
4. Add a text summary "N of 12 missed" above.
Add a "Variance Callout Box" next to a KPI:
- Left: KPI card with value, "plan $X" in muted text and a progress bar to plan.
- Right: a dashed 2px red-bordered box with a 10% red tint containing an UPPERCASE "Variance" label, the signed variance in bold red, and "% to plan" muted.
- Turn the box accent-colored instead of red when the variance is positive.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Variance Callout":
1. Measures: Variance = [Sales] − [Plan]; Variance % = DIVIDE([Variance],[Plan]).
2. Place a card next to the KPI with a dashed border (Power BI: border style; Tableau: container border dashed).
3. Conditional color: red when negative, accent when positive.
4. Show a bar of actual ÷ plan under the KPI.
Add a "Threshold Line" alert to a trend:
- A slider sets the alert threshold; the chart draws it as a dashed red reference line labelled with the value.
- Every point below the threshold gets a red dot; header shows "N months below".
- Main series stays in the accent color with a light area fill.
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Threshold Line":
1. Create a parameter (Power BI: what-if numeric parameter) for the threshold.
2. Add it as a reference/constant line, dashed red, with a data label.
3. Color marks by calc: Sales < Threshold → red.
4. Show a count of breaches in the title.
Add a "Status Light List":
- Card with one row per item: colored status dot (critical red, warning accent, ok muted), name, the metric value, and a severity pill.
- Divider lines between rows; footer in muted text stating the rules (e.g. "<35% critical · <40% warning").
Keep data and calculations unchanged; alert colors must also be paired with an icon or text so they are not color-only.
Tableau
Build a "Status Light List":
1. Table with Category, Margin, and a Status calc (Critical / Warning / OK).
2. Power BI: conditional formatting icons on Status; Tableau: circle shape column colored by Status.
3. Add a caption that explains the thresholds.