Challenge - 5 Problems
ALL Function Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate2:00remaining
Calculate total sales ignoring filters on Product Category
Given a Sales table with columns [SalesAmount] and [ProductCategory], what is the result of this measure when the report page filters ProductCategory to 'Bikes' only?
Assume total sales for all categories is 1000, and sales for 'Bikes' category is 300.
Total Sales All Categories = CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[ProductCategory]))Assume total sales for all categories is 1000, and sales for 'Bikes' category is 300.
Power BI
Total Sales All Categories = CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[ProductCategory]))
Attempts:
2 left
💡 Hint
ALL removes filters on the specified column, so the measure ignores the page filter on ProductCategory.
✗ Incorrect
The ALL function removes any filters on Sales[ProductCategory], so the measure sums sales across all categories, ignoring the page filter.
❓ visualization
intermediate2:00remaining
Visualizing effect of ALL on filter context
You have a report page filtered to Year = 2023. You create two measures:
Which visualization best shows the difference between these two measures?
SalesFiltered = SUM(Sales[SalesAmount])SalesAllYears = CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[Year]))Which visualization best shows the difference between these two measures?
Attempts:
2 left
💡 Hint
ALL removes the Year filter, so SalesAllYears shows total sales for all years regardless of page filter.
✗ Incorrect
The bar chart with Year axis and both measures shows how SalesFiltered respects the Year filter (only 2023) while SalesAllYears ignores it and shows total sales for all years.
🧠 Conceptual
advanced2:00remaining
Understanding ALL with multiple columns
What happens when you use ALL on multiple columns like this?
Choose the correct explanation.
CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[ProductCategory], Sales[Year]))Choose the correct explanation.
Attempts:
2 left
💡 Hint
ALL can accept multiple columns to remove filters on all of them.
✗ Incorrect
ALL(Sales[ProductCategory], Sales[Year]) removes filters on both columns, so the measure ignores filters on either column.
🔧 Formula Fix
advanced2:00remaining
Identify the error in this ALL usage
What error will this DAX measure produce?
Assuming 'Date' is a table, not a column.
Measure = CALCULATE(SUM(Sales[Amount]), ALL('Date'))Assuming 'Date' is a table, not a column.
Power BI
Measure = CALCULATE(SUM(Sales[Amount]), ALL('Date'))Attempts:
2 left
💡 Hint
ALL can accept a table name to remove all filters on that table.
✗ Incorrect
ALL can accept a table name to remove all filters on that table, so this measure removes all filters on the Date table and sums Sales[Amount].
🎯 Scenario
expert3:00remaining
Using ALL to create a dynamic percentage of total
You want to create a measure that shows the percentage of total sales for each ProductCategory, ignoring any filters on ProductCategory but respecting other filters like Year.
Which DAX measure achieves this correctly?
Which DAX measure achieves this correctly?
Attempts:
2 left
💡 Hint
You want to remove filters only on ProductCategory to get total sales across all categories but keep other filters.
✗ Incorrect
Using ALL(Sales[ProductCategory]) removes filters on ProductCategory only, so the denominator is total sales across all categories respecting other filters like Year.