Prompt Details
Model
(claude-4-6-sonnet)
Token size
363
Example input
[TABLE NAME]: Projects
[STATUS COLUMN]: Project_Status
[BAND 1]: Complete
[BAND 2]: In Progress
[BAND 3]: Not Started
Example output
Status Band =
VAR vRaw = SELECTEDVALUE('Projects'[Project_Status])
RETURN
SWITCH(TRUE(),
ISBLANK(vRaw), "Not Started", -- blank always first
IFERROR(SEARCH("complete", vRaw), 0) > 0, "Complete",
IFERROR(SEARCH("active", vRaw), 0) > 0, "Complete",
IFERROR(SEARCH("pending", vRaw), 0) > 0, "In Progress",
IFERROR(SEARCH("review", vRaw), 0) > 0, "In Progress",
IFERROR(SEARCH("cancelled",vRaw), 0) > 0, "Not Started",
"Unknown" -- catch-all
)
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-6-SONNET
Generates a DAX calculated column that categorises any raw text status column into four clean standardised bands using partial text matching. Works for project status, order status, HR onboarding, helpdesk ticket state, approval workflows, or any Power BI table with a free-text classification column. Handles partial matches, blank values, and reserved keyword conflicts automatically.
...more
Added 1 week ago
