PL-300 Visualize and analyze the data Practice Question
You want to create a measure that calculates the percentage of total sales for each product category. What DAX function should you use to get the grand total?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
ALL
ALL, because it removes all filters from the specified table or column and returns the grand total across the entire dataset, which is exactly what is needed to compute each category's percentage of total sales (e.g., SUM(Sales[Amount]) / CALCULATE(SUM(Sales[Amount]), ALL(Product[Category]))). ALL is the standard DAX function for obtaining an unfiltered grand total in ratio measures. VALUES does not remove filters; it returns a single-column table of distinct values, so it cannot produce a grand total. ALLSELECTED respects filters applied outside the query (such as slicers) rather than giving the true grand total, and REMOVEFILTERS is a filter modifier used inside CALCULATE that removes filters but is not the conventional function for retrieving a grand total in this scenario.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
VALUES
Why it's wrong here
VALUES returns a single-column table of distinct values from the specified column. When used inside CALCULATE as a filter, it would actively filter to those specific values rather than removing filters, so the denominator would be a filtered total, not the grand total. This makes VALUES unsuitable for calculating a percentage relative to the overall total, because it preserves the current context instead of clearing it.
- ✗
ALLSELECTED
Why it's wrong here
ALLSELECTED is specifically designed to respect the user's outer filter context, such as slicer selections, while removing filters from inner query dimensions. This means the denominator would reflect the total of the currently selected categories, not the grand total across all data. For a percentage of the full dataset, you need to ignore those slicers, so ALLSELECTED yields an incorrect result unless you actually want a percentage of the selected total.
- ✗
REMOVEFILTERS
Why it's wrong here
REMOVEFILTERS can technically clear filters and would work inside CALCULATE to produce a grand total, making it a possible alternative. However, ALL is the more standard, conventional, and widely documented function for percentage-of-total calculations in DAX, and it is the expected pattern in most training materials. While REMOVEFILTERS is explicit about its purpose, ALL is more concise and familiar to DAX developers, making it the correct choice for this classic scenario.
- ✓
ALL
Why this is correct
ALL('Sales'[Category]) inside a CALCULATE removes all filters applied to the Category column, including row and slicer filters, giving you the grand total across every category. This is the canonical method for building a percentage-of-total measure: you divide the current category's sales by the unfiltered total from CALCULATE with ALL. By clearing only the category filter, you preserve other context like date ranges, making the measure precise and flexible.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 524 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.