You can use ChatGPT for data analysis to check a spreadsheet for missing values, write an Excel formula, draft a SQL query, or explain a Power BI measure. Start by telling it what your data contains, what question you need to answer, and what the result should look like.
Below are 15 copy-and-paste prompts for Excel, SQL, and Power BI. Replace the sample columns and figures with details from data you’re allowed to use.
How to Use ChatGPT for Data Analysis
A request like “Analyse my sales data” leaves a lot open. If you want to find your top products, say whether “top” means highest revenue, most units sold, or highest profit.
Include these details when writing a prompt.
- Goal — The business question you want to answer.
- Data — The available tables and columns, and what one row represents.
- Rules — The date range, filters, and calculations to use.
- Output — The format you need, such as a formula, query, chart, or short summary.
- Verification — How you’ll check the result against a known total or a small sample.
Example prompt
I have sales data with Date, Product, Category, Region, Units, and Revenue. Show me how to find the five products with the highest total revenue across all regions. Return the product names and revenue totals, sorted from highest to lowest. Explain how I can verify the totals.
Use data you’re allowed to share
Follow your organisation’s data policy before sharing customer, employee, financial, or business data. If you can’t share the real file, use dummy data. For help with a formula or SQL query, column names and a few made-up rows are often enough.
Excel Prompts for Data Analysis

1. Check an Excel Dataset for Common Problems
Copy this prompt
My Excel sheet contains Customer ID, City, Purchase Date, Product, and Revenue. Show me how to check for duplicate rows, missing values, inconsistent city names, and dates stored as text. Give me a step-by-step plan for reviewing and analysing the sheet. Keep the original data unchanged.
2. Find Duplicate Customer Records
Copy this prompt
My Excel sheet has multiple rows for some customers. Each customer has a unique Customer ID. Show me how to create a separate list with the most recent purchase record for each customer. Give me a manual method and a Power Query method. Explain what to do if two records have the same Customer ID and Purchase Date.
Keep the original orders sheet. A customer can make several valid purchases, so a repeated customer ID doesn’t automatically mean you have a duplicate transaction.
3. Create an Excel Formula for a 10% Discount
Copy this prompt
Column D contains Order Value. I want column E to show the final amount after a 10% discount on orders above ₹5,000. Orders of ₹5,000 or less should keep their original value. Give me the formula for E2 and show the expected results for orders worth ₹4,000, ₹5,000, and ₹6,000.
A formula for this example is =IF(D2>5000,D2*0.9,D2). The three test amounts should return ₹4,000, ₹5,000, and ₹5,400. The middle value checks that the discount applies only above the threshold.
4. Understand a #N/A Error in Excel
Copy this prompt
I’m getting a
#N/Aerror from=VLOOKUP(A2, Customers!A:B, 2, FALSE). Explain whatFALSEdoes. Then show me how to check whether the lookup value is missing, contains extra spaces, or is stored as text in one sheet and as a number in the other.
5. Summarise an Excel Pivot Table
Copy this prompt
My pivot table shows sales of ₹4,50,000 for North, ₹3,20,000 for South, ₹2,80,000 for East, and ₹1,90,000 for West. Write a short summary for a sales manager. Identify the highest- and lowest-revenue regions, calculate each region’s share of total sales, and suggest two things the manager could investigate next.
The overall total is ₹12,40,000. Use it to check the percentages before including them in a report.
SQL Prompts for Data Analysis

Tell ChatGPT which database you use, such as PostgreSQL, MySQL, or SQL Server. This helps it give you syntax that fits your setup.
6. Write a SQL Query for Revenue by City
Copy this prompt
I have two tables:
customers(customer_id, customer_name, city)andorders(order_id, customer_id, order_date, order_amount). Each row inordersrepresents one order. Write a query that returns one row per city with total revenue and the number of orders placed in 2026. Explain the join, date filter, and grouping.
7. Fix a SQL Error
Copy this prompt
My query is
SELECT customer_name, COUNT(order_id) FROM customers GROUP BY city;. Thecustomerstable containscustomer_id,customer_name, andcity. Theorderstable containsorder_idandcustomer_id. Explain why the query fails and show me how to count orders by city.
The query needs to join orders to access order_id. It should return the city in the SELECT list because the intended result has one row per city.
8. Explain SQL Joins
Copy this prompt
Explain
INNER JOIN,LEFT JOIN,RIGHT JOIN, andFULL OUTER JOINusing small customers and orders tables. Include a customer with no orders and one with two orders. Show the query and expected result for each join. Mention any differences in syntax for my database.
9. Find the Five Highest-Revenue Products in Each Region
Copy this prompt
My sales table contains
product_name,product_category,region,sale_date, andrevenue. Write a SQL query to find the five products with the highest total revenue in each region. Explain how to group sales and rank products with a window function. Show what happens if two products tie for fifth place.
10. Check Sales Data Quality With SQL
Copy this prompt
My sales table contains
order_id,customer_id,product_id,order_date,quantity,unit_price, andrevenue. One order can contain several product lines. Write SQL queries to check for missing values, negative quantities, and differences between revenue and quantity multiplied by unit price. Explain how returns, discounts, and rounding might affect the checks. Tell me what fields I need to identify duplicate order lines.
If you’re still building your Excel and SQL skills, see OneLeap’s guide to becoming a data analyst as a beginner.
Power BI Prompts for Data Analysis

Power BI uses DAX, short for Data Analysis Expressions, to define measures. A measure such as Total Sales can recalculate when you filter a report by region, product, or date.
11. Create DAX Measures for Current and Prior-Year Sales
Copy this prompt
My Power BI model has a
Salestable with Sales Amount, Quantity, Product, Region, and Date. I also have a calendar table related toSales[Date]. Write DAX measures for Total Sales and Sales Last Year. Explain what the calendar table needs for the comparison and show me how to test the measures in a report by month.
12. Understand How a DAX Measure Responds to Filters
Copy this prompt
Explain what
Total Sales = SUM(Sales[Sales Amount])does. Use a small example to show how the result changes when I select North in a Region slicer or filter the report to one month.
13. Choose the Right Power BI Visuals
Copy this prompt
I need to show sales by month, compare sales across regions, and identify the 10 products with the highest revenue. Recommend a Power BI visual for each task and tell me which fields to use. Explain when a line chart, bar chart, map, KPI card, or table would work well.
14. Plan a Power BI Sales Dashboard
Copy this prompt
I’m building a dashboard for a retail sales manager. My data includes order date, order ID, product, region, sales channel, quantity, and revenue. Suggest six KPIs I can calculate from these fields. Define each KPI, recommend a visual, and arrange them in a simple one-page layout.
15. Turn Power BI Results Into Business Insights
Copy this prompt
My Power BI report shows that total sales rose 12% month-on-month, online sales grew 25%, and in-store sales fell 8%. The North region generated 40% of total sales. Give me five observations and three follow-up actions for a sales manager. Separate what the figures show from possible explanations, and list the additional data needed to test those explanations.
Worked Example: Explain a Change in Sales
Suppose online sales grew 25% last month while store sales fell 8%. You can use a short prompt to turn those figures into an update for a manager.
Copy this prompt
Online sales grew 25% last month while store sales fell 8%. Write a two-sentence summary for a sales manager. Report both changes and suggest what to check before explaining them.
Example response
Online sales rose 25% last month while store sales fell 8%. Check website traffic, store footfall, promotions, and stock availability to understand what might explain the difference.
The figures show how each sales channel performed. If you want to test whether shoppers moved from stores to online, look for evidence such as purchase histories across both channels.
How to Verify ChatGPT’s Data Analysis
A formula or query can run successfully and still answer the wrong question. Before you report the result, check the following.
- Confirm the scope. Check the date range, filters, and business definitions.
- Test a small sample. Calculate a few results yourself, including a boundary case such as an order worth exactly ₹5,000.
- Reconcile the totals. Compare your result with a figure you’ve already verified.
- Check SQL joins. Compare row counts and totals before and after joining to catch unexpected duplication.
- Review the interpretation. Identify which findings the data supports and which need further testing.
For more on checking code and outputs, read OpenAI’s guide to data analysis with ChatGPT.

Frequently Asked Questions
Can ChatGPT Analyse Excel Data?
Yes. You can ask it to review a supported spreadsheet, suggest formulas, summarise trends, or help you choose a chart. Provide clear column names and a specific question, then verify the result against a small sample.
Is SQL Generated by ChatGPT Accurate?
It depends on the table structure, database, and business rules you provide. Test the query on a small dataset with a known answer. Check how it handles joins, missing values, and date filters before using it for a report.
Can ChatGPT Replace a Data Analyst?
ChatGPT can help draft formulas, write queries, and summarise results. Data analysts still define the business question, verify the data, and decide what action the evidence supports.
What Are Good ChatGPT Prompts for Beginners?
Start with one task and a few columns. For example, ask how to calculate total revenue by region in Excel. Then ask how to check that the regional totals add up to the overall total.


Leave a Reply