Define and validate Power BI measures
Calculate sales, cost, gross profit and margin from a small fictional dataset.
What you will be able to do
- Validate DAX totals against Excel and use a safe divide for zero sales.
Suggested preparation: Analyse Excel data with AI ·
Try the task
- Load the sales CSV as a table named Sales. Define Total Sales = SUM(Sales[Sales]), Total Cost = SUM(Sales[Cost]), Gross Profit = [Total Sales]-[Total Cost], GP % = DIVIDE([Gross Profit],[Total Sales]). Test a zero-sales filter.
- Use fictional or permitted inputs. Identify missing information before asking AI to help.
- Attempt the task yourself, then use the prompt to compare methods. Keep the source with your working.
- Check the result against the worked answer and complete the checkpoint. Correct an error before saving completion.
Fictional practice data
Month,Sales,Cost January,100000,60000 February,120000,75000 March,90000,55000
Try this prompt
Draft DAX for sales, cost, gross profit and margin using this sample. Explain filter context and zero-sales handling. Reconcile overall totals to the CSV.
Your working notes
Check your result
Use only the supplied facts. This checkpoint validates these specific calculations or decisions; it does not certify professional competence.
Worked answer and review criteria
Sales ₹310000; cost ₹190000; gross profit ₹120000; margin 38.709677%. A changed filter changes the context; it does not change the source rows.
- Every amount reconciles to the supplied data.
- Missing facts and unsupported conclusions are identified.
- The result can be independently reproduced.
Try the checkpoint yourself before relying on this answer.
What to do next
Read the full practical guide →
Understand what AI can and cannot do →
30-day daily practice plan → · Long-term AI mastery reference →