Prompt Details
Model
(claude-4-6-sonnet)
Token size
255
Example input
[DateColumn]: LastReviewDate
[CategoryColumn]: Category
[HighRiskCategory]: Supplier
[StalenessThreshold]: 90
Example output
// Example 1: LastReviewDate column, Category = "Supplier", HighRiskCategory = "Supplier", StalenessThreshold = 90
Risk Score =
SWITCH(
TRUE(),
// Critical: high-risk category AND date older than threshold
'Table'[Category] = "Supplier" && TODAY() - 'Table'[LastReviewDate] > 90, "Critical",
// High: date older than threshold (any category)
TODAY() - 'Table'[LastReviewDate] > 90, "High",
// Medium: date older than half the threshold
TODAY() - 'Table'[LastReviewDate] > 45, "Medium",
// Low: date is recent
"Low"
)
// Self-check: possible values are Critical, High, Medium, Low
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-6-SONNET
Score any Power BI table row as Critical, High, Medium, or Low risk using two conditions: date staleness and a category value. Paste your column names and thresholds — get a clean, production-ready DAX calculated column with inline comments and a self-check note. Built for Power BI report developers who need consistent, auditable risk logic.
...more
Added 1 week ago
