Download the AI Prompt Toolkit

CASE STUDY FILE ORGANIZATION

Prompt Card:

Build a Folder + File Naming Convention

___________________________________________________

Category: Project Setup, Organization, Portfolio

Use When: You're starting a new analytics case study or client project and want to create a standardized folder and naming structure.

Prompt:

"Create a clean naming convention and folder structure for a data analytics project. It should include folders for raw data, cleaned data, visuals, documentation, and exports. Filenames should be consistent, clear, and include version numbers and dates. Add an example of a naming format for each type of file.

AI Prompt Toolkit for Data Analysts

These are ready-to-use AI prompts and templates I’ve developed to save time, boost quality, and reduce stress across my data analysis workflow — including Excel, Power BI, and Power Query. Feel free to try them, tweak them, and use them in your own work.

POWER BI/DAX

Prompt Card:

Create a DAX Measure

____________________________________________

Category: Power BI, DAX, Custom Measure Builder

Use When: You need a reusable DAX measure for a custom metric based on specific conditions, especially if it’s not a common template (like YTD or MoM). Very useful for brainstorming and testing complex KPIs.

"I'm analyzing [Sales, Revenue, Customer Retention, etc.] in Power BI. Can you write a reusable DAX measure that calculates [metric] using [conditions or filters]? Assume the table is called 'SalesData'."

Example:

"Calculate total revenue for the current quarter, excluding refunds."

POWER BI/DAX

Prompt Card:

Rank Customers by Sales

___________________________________________________

Category: Power BI, DAX, Ranking

Use When: You want to identify top customers or assign ranks dynamically in visuals.

Prompt:

"Write a DAX measure that ranks customers by total sales in descending order using RANKX. It should work in a visual filtered by year and return ties with the same rank."

 POWER BI/DAX

Prompt Card: Calculate MoM Growth Rate

___________________________________________________

Category: Power BI, DAX, Month-over-Month

Use When: You want to compare current month sales to previous month.


Prompt:


”Write a DAX measure to calculate Month-over-Month sales growth using the 'Sales' table and a 'Date' table. Return the result as a percentage and handle null or zero values."



SQL

Prompt Card: Use Window Functions

___________________________________________________

Category: SQL, Window Functions, Advanced

Use When: You want to calculate metrics like ranks, running totals, or moving averages without grouping rows.

Prompt:

"Write an SQL query using the RANK() window function to rank employees by salary within each department using the 'Employees' table."

SQL

Prompt Card: Summarize Customer Behavior

_______________________________________________________

Category: SQL, Aggregation, Customer Analysis

Use When: You want to understand how customers interact over time.

Prompt:

"Write a SQL query that returns each customer’s total number of orders, first purchase date, and most recent purchase amount."

SQL

Prompt Card: SQL with DISTINCT, CASE WHEN, and Time Functions

_______________________________________________________

Category: SQL, Conditional Logic & Time Analysis

Use When: You need to handle unique values, create conditional columns, and analyze time-based patterns.

Prompt:

"Write a SQL query that:
– Uses DISTINCT to return only unique values
– Uses a CASE WHEN statement to label or categorize data
– Applies a time function (like DATEDIFF, DATE_TRUNC, YEAR, MONTH, or CURRENT_DATE) to analyze or filter data by date
– Filters with WHERE, sorts with ORDER BY, and uses meaningful aliases."

EXCEL/POWER QUERY

Prompt Card:

Clean and Rename Excel Columns

___________________________________________________

Category: Excel, Data Cleaning, Beginner

Use When: You’ve copied a messy data table into Excel and need to quickly clean it up and rename columns clearly.

Prompt:

“I’ve pasted a raw data table from a website or report into Excel. Help me clean the headers by removing special characters, converting to lowercase, replacing spaces with underscores, and making sure all column names are valid and unique. Output a cleaned list I can copy into Power Query.”

POWER BI/DAX

Prompt Card:

Generate a Reusable DAX Measure -        YOY Growth Rate

___________________________________________________

Category: Power BI, DAX, Measures

Use When: You want to standardize your calculations across reports, like calculating YoY growth, averages, or rankings.

Prompt:

"Write a reusable DAX measure that calculates Year-over-Year Sales Growth based on a 'Sales' table. Format the result as a percentage and handle any blanks or divide-by-zero errors. Also include notes on how to reuse this measure across reports."

POWER BI/DAX

Prompt Card:

Calculate Rolling 3-Month Average

___________________________________________________

Category: Power BI, DAX, Time Intelligence

Use When: You want to smooth out recent trends using a short-term rolling window.

Prompt:

"Write a DAX measure to calculate a 3-month rolling average of sales. Use the 'Sales' table and make sure it works with a properly related 'Date' table. Include logic to handle edge cases where fewer than 3 months of data exist."

SQL

Prompt Card: Filter Data with WHERE Clause

__________________________________________________

Category: SQL, Filtering, Beginner

Use When: You want to return only specific rows from a table based on set conditions.

Prompt:

"Write an SQL query to select all columns from the 'Orders' table where the order status is 'Shipped' and the total is greater than 100.

SQL

Prompt Card: Pivot Data with CASE WHEN

_______________________________________________________

Category: SQL, Pivoting, Aggregation

Use When: You want to turn row values into columns for better comparison.

Prompt:

"Write an SQL query to pivot monthly sales data from the 'Sales' table so that each month becomes a column with its total sales."

SQL

Prompt Card: Join Multiple Tables

____________________________________________________

Category: SQL, JOINs, Data Modeling

Use When: You want to bring together related data from different tables.

Prompt:

"Write a SQL query that joins the 'Orders', 'Customers', and 'Products' tables to return the customer name, product name, and quantity for each order."

SQL

Prompt Card: Design a SQL Schema

_____________________________________________________

Category: SQL, Schema Design, Data Modeling

Use When: You’re planning a new project and need to design tables, relationships, and keys before inserting or querying data.

Prompt:

"I’m designing a relational database for [describe business or scenario].
Please create a SQL schema that includes:
– A primary table with relevant fields
– At least one related table
– Proper primary and foreign keys
– Data types for each field
– Optional constraints (NOT NULL, UNIQUE, etc.)"

EXCEL/POWER QUERY

Prompt Card:

Power Query Data Cleanup

___________________________________________________

Category: Excel, Power Query, Data Cleaning

Use When: You’ve copied a messy data table into Excel and need to quickly clean it up and rename columns clearly.

Prompt:

"I have pasted a messy data table below. Can you generate Power Query M code to:

- Remove blank rows

- Promote headers- Change all columns to proper data types

- Filter out error values

Here’s the table:

[paste data here]"

POWER BI/DAX

Prompt Card:

Calculate Year-to-Date Sales (YTD)

___________________________________________________

Category: Power BI, DAX, YTD Calculations

Use When: You want to measure cumulative performance from the beginning of the year to the current date.

Prompt:

"Write a reusable DAX measure to calculate Year-to-Date Sales using the 'Sales' table and a 'Date' table with a proper date relationship. Handle blank values and use TOTALYTD."

POWER BI/DAX

Prompt Card:

Dynamic % of Total (by Category)

__________________________________________________


Category: Power BI, DAX, Percentage of Total

Use When: You want to show each category’s share of a total value, updating with filters.

Prompt:

"Create a DAX measure that calculates each product category’s sales as a percentage of total sales. It should update dynamically based on report filters."


SQL

Prompt Card: Use Common Table Expressions (CTEs)

___________________________________________________

Category: SQL, CTEs, Readability

Use When: You want to break down complex queries into manageable chunks.

Prompt:

"Use a CTE to calculate total sales by customer from the 'Sales' table, then return only customers with totals above 10,000."

SQL

Prompt Card: Calculate YoY Growth in SQL

_______________________________________________________

Category: SQL, Time Intelligence, Finance

Use When: You want to compare performance year-over-year directly in SQL.

Prompt:

"Write a SQL query to calculate year-over-year revenue growth using the 'Sales' table and a 'Date' table with proper relationships."

SQL

Prompt Card: All-in-One SQL Query Template

_______________________________________________________

Category: SQL, Beginner to Intermediate

Use When: You want a structured query that walks through data selection, filtering, grouping, sorting, joining, and formatting—all in one prompt.

Prompt:

"Write a SQL query using the following structure:
SELECT specific columns from a table
JOIN with another table on a common key
WHERE filter for specific criteria
GROUP BY to aggregate results
HAVING to filter aggregates
ORDER BY to sort the final results
– Use LIMIT to return only the top 10 rows
Format the output clearly and use aliases where appropriate."