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
- Academic Research Brainstorm and Improvement Analyzeranalystresearch
- ML Missing Values Treatment Pipelineanalystanalysis
- Quantitative Sports Betting Edge Evaluatoranalystanalysis
- B2B Manufacturing Homepage Tech-SEO Diagnosticanalystanalysis
- OSINT US Surveillance Source Investigatoranalystresearch
- Curated Compendium of Cuckold BNWO Websitesanalystresearch
- US Indices Market News and Sentiment Reporteranalystfinance
- Technical Academic Paper Revieweranalystanalysis
- UX Landing Page Conversion Analyzeranalystanalysis
- Incident Root Cause Analysis Generatoranalystoperations