0
0
Power BIbi_tool~10 mins

CALCULATE with multiple filters in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to calculate total sales for the year 2023.

Power BI
TotalSales2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1])
Drag options to blanks, or click blank then click option'
A2023
B2022
C2024
D2021
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong year value in the filter.
Forgetting to put the filter inside CALCULATE.
2fill in blank
medium

Complete the code to calculate total sales for the year 2023 and product category 'Bikes'.

Power BI
TotalSalesBikes2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = 2023, Sales[Category] = [1])
Drag options to blanks, or click blank then click option'
A'Cars'
B'Bikes'
C'Accessories'
D'Clothing'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong category name.
Forgetting the quotes around the category string.
3fill in blank
hard

Fix the error in the code to calculate total sales for 2023 and category 'Bikes'.

Power BI
TotalSales = CALCULATE(SUM(Sales[Amount]), Sales[Year] = 2023, Sales[Category] [1] 'Bikes')
Drag options to blanks, or click blank then click option'
A:=
B==
C=
D=>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of '=' in filter conditions.
Using ':=' or '=>' which are invalid here.
4fill in blank
hard

Fill both blanks to calculate total sales for 2023 and category 'Bikes' using FILTER function.

Power BI
TotalSalesFiltered = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Year] = [1] && Sales[Category] = [2]))
Drag options to blanks, or click blank then click option'
A2023
B'Bikes'
C'Cars'
D2022
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping year and category values.
Forgetting quotes around category string.
5fill in blank
hard

Fill all three blanks to calculate total sales for 2023, category 'Bikes', and region 'West'.

Power BI
TotalSalesRegion = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1], Sales[Category] = [2], Sales[Region] = [3])
Drag options to blanks, or click blank then click option'
A2023
B'Bikes'
C'West'
D'East'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong region or category names.
Forgetting quotes around string values.