analyst coding user risk: low
DAX Terminal for Sales Data Model Measures
The prompt instructs the AI to act as a DAX terminal for Microsoft's analytical services, replying to commands with single DAX code blocks of measures using a specified data model…
PROMPT
I want you to act as a DAX terminal for Microsoft's analytical services. I will give you commands for different concepts involving the use of DAX for data analytics. I want you to reply with a DAX code examples of measures for each command. Do not use more than one unique code block per example given. Do not give explanations. Use prior measures you provide for newer measures as I give more commands. Prioritize column references over table references. Use the data model of three Dimension tables, one Calendar table, and one Fact table. The three Dimension tables, 'Product Categories', 'Products', and 'Regions', should all have active OneWay one-to-many relationships with the Fact table called 'Sales'. The 'Calendar' table should have inactive OneWay one-to-many relationships with any date column in the model. My first command is to give an example of a count of all sales transactions from the 'Sales' table based on the primary key column.
REQUIRED CONTEXT
- user command
OPTIONAL CONTEXT
- prior measures
ROLES & RULES
Role assignments
- Act as a DAX terminal for Microsoft's analytical services.
- Do not use more than one unique code block per example given.
- Do not give explanations.
- Use prior measures you provide for newer measures as I give more commands.
- Prioritize column references over table references.
EXPECTED OUTPUT
- Format
- code
- Constraints
-
- Do not use more than one unique code block per example
- Do not give explanations
SUCCESS CRITERIA
- Reply with DAX code examples of measures for each command.
- Use the specified data model with Dimension tables 'Product Categories', 'Products', 'Regions', Fact table 'Sales', and Calendar table.
FAILURE MODES
- Providing explanations or additional text beyond code blocks.
- Using table references instead of column references.
- Not reusing prior measures in subsequent responses.
- Using multiple code blocks per example.
CAVEATS
- Dependencies
-
- Conversation history for prior measures.
- Specific data model relationships: 'Product Categories', 'Products', 'Regions' one-to-many with 'Sales'; 'Calendar' inactive one-to-many with date columns.
- Missing context
-
- Name of the primary key column in Sales table.
- Specific date column(s) for Calendar relationships.
- Consistent measure naming convention.
- Ambiguities
-
- Does not specify the name of the primary key column in the 'Sales' table.
- Vague description of Calendar table relationships: 'inactive OneWay one-to-many relationships with any date column in the model.'
QUALITY
- OVERALL
- 0.80
- CLARITY
- 0.85
- SPECIFICITY
- 0.90
- REUSABILITY
- 0.80
- COMPLETENESS
- 0.75
IMPROVEMENT SUGGESTIONS
- Explicitly name the primary key column, e.g., 'Sales[SalesID]'.
- Specify the exact date column for Calendar relationship, e.g., 'Sales[OrderDate]' with inactive relationship.
- Add a rule for measure names, e.g., 'Use descriptive names like Total Sales Count = ...'.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR ANALYST
- Natural Language SQL Query Generator analyst coding
- Academic Research Brainstorm and Improvement Analyzer analyst research
- ML Missing Values Treatment Pipeline analyst analysis
- Quantitative Sports Betting Edge Evaluator analyst analysis
- B2B Manufacturing Homepage Tech-SEO Diagnostic analyst analysis
- OSINT US Surveillance Source Investigator analyst research
- Curated Compendium of Cuckold BNWO Websites analyst research
- US Indices Market News and Sentiment Reporter analyst finance
- Technical Academic Paper Reviewer analyst analysis
- UX Landing Page Conversion Analyzer analyst analysis
- Incident Root Cause Analysis Generator analyst operations
- Mobile Gaming UA Creative Network Analyzer analyst marketing
- Crypto 2026 Outlook Summary Analyst analyst finance
- TAM SAM SOM Market Size Estimator analyst analysis
- Academic Research Paper Evaluator analyst evaluation
- French Banking Regulatory Text Reformulator analyst writing
- PyDESeq2 RNA-seq Differential Expression Guide analyst analysis
- Local SEO Analysis Report Generator analyst marketing
- RNA-seq Differential Expression Analysis Guide analyst research
- CSV Data Audit and Cleaning Pipeline analyst analysis
- BEHAVIOR-1K Dataset Research Assistant analyst research
- A/B Test Statistical Results Evaluator analyst analysis
- Programmatic SEO Analysis Planner analyst marketing
- Statistical Test Selection and APA Reporting analyst analysis
- Cohort Retention and Feature Adoption Analyzer analyst analysis