Prompt Details
Model
(claude-4-6-sonnet)
Token size
346
Example input
[TABLE NAME]: Orders
[AGGREGATION TYPE]: COUNT
[NUMERIC COLUMN]: Order_ID
Example output
Confirmed Orders =
VAR vResult =
CALCULATE(
COUNT('Orders'[Order_ID]), -- count rows in filtered context
FILTER(
'Orders',
'Orders'[Order_Status] = "Confirmed" -- only include confirmed orders
)
)
RETURN
IF(ISBLANK(vResult), BLANK(), vResult) -- return BLANK not zero when no rows match
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-6-SONNET
Generates a production-ready DAX measure that aggregates any numeric column using a filtered condition — supporting COUNT, SUM, AVERAGE, or MAX. Works for sales totals, headcount, project scoring, invoice values, or any dataset where a filtered aggregation must be returned as a clean Power BI measure. Handles blank values, filter context conflicts, and CALCULATE wrapper requirements automatically.
...more
Added 3 weeks ago
