0
0
Power BIbi_tool~20 mins

ALL function for removing filters in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ALL Function Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2: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?

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]))
A1000
B300
C0
DError: ALL function cannot be used here
Attempts:
2 left
💡 Hint
ALL removes filters on the specified column, so the measure ignores the page filter on ProductCategory.
visualization
intermediate
2:00remaining
Visualizing effect of ALL on filter context
You have a report page filtered to Year = 2023. You create two measures:

SalesFiltered = SUM(Sales[SalesAmount])
SalesAllYears = CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[Year]))

Which visualization best shows the difference between these two measures?
AA bar chart with Year on axis and both measures as values, showing SalesFiltered only for 2023 and SalesAllYears for all years
BA pie chart showing SalesFiltered and SalesAllYears as slices for 2023 only
CA table with Year and SalesFiltered only, ignoring SalesAllYears
DA line chart with Month on axis and SalesFiltered measure only
Attempts:
2 left
💡 Hint
ALL removes the Year filter, so SalesAllYears shows total sales for all years regardless of page filter.
🧠 Conceptual
advanced
2:00remaining
Understanding ALL with multiple columns
What happens when you use ALL on multiple columns like this?

CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[ProductCategory], Sales[Year]))

Choose the correct explanation.
ARemoves filters on all columns in the Sales table, not just ProductCategory and Year.
BRemoves filters only if both ProductCategory and Year are filtered together, otherwise keeps filters.
CRemoves filters on both ProductCategory and Year columns, so the measure sums sales ignoring filters on these columns.
DCauses a syntax error because ALL accepts only one column.
Attempts:
2 left
💡 Hint
ALL can accept multiple columns to remove filters on all of them.
🔧 Formula Fix
advanced
2:00remaining
Identify the error in this ALL usage
What error will this DAX measure produce?

Measure = CALCULATE(SUM(Sales[Amount]), ALL('Date'))

Assuming 'Date' is a table, not a column.
Power BI
Measure = CALCULATE(SUM(Sales[Amount]), ALL('Date'))
AReturns sum filtered only by Date table filters
BSyntaxError: ALL requires column references, not table names
CTypeError: Cannot use table name in ALL function
DNo error, returns sum ignoring all filters on Date table
Attempts:
2 left
💡 Hint
ALL can accept a table name to remove all filters on that table.
🎯 Scenario
expert
3: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?
APercent of Total = DIVIDE(SUM(Sales[SalesAmount]), CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales)))
BPercent of Total = DIVIDE(SUM(Sales[SalesAmount]), CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[ProductCategory])))
CPercent of Total = DIVIDE(SUM(Sales[SalesAmount]), CALCULATE(SUM(Sales[SalesAmount]), ALL(Sales[Year])))
DPercent of Total = DIVIDE(SUM(Sales[SalesAmount]), CALCULATE(SUM(Sales[SalesAmount]), ALLSELECTED(Sales[ProductCategory])))
Attempts:
2 left
💡 Hint
You want to remove filters only on ProductCategory to get total sales across all categories but keep other filters.