0
0
Power BIbi_tool~10 mins

CALCULATE function introduction 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 using CALCULATE.

Power BI
Total Sales = CALCULATE(SUM(Sales[[1]]))
Drag options to blanks, or click blank then click option'
AAmount
BDate
CCustomer
DProduct
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column that does not contain numeric sales data.
Confusing dimension columns like Date or Product with sales values.
2fill in blank
medium

Complete the code to calculate sales filtered by the year 2023.

Power BI
Sales 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1])
Drag options to blanks, or click blank then click option'
A2021
B2022
C2024
D2023
Attempts:
3 left
💡 Hint
Common Mistakes
Using a year not present in the data.
Using quotes around the year number, which is not needed.
3fill in blank
hard

Fix the error in the code to calculate sales for the 'Electronics' category.

Power BI
Electronics Sales = CALCULATE(SUM(Sales[Amount]), Sales[Category] = [1])
Drag options to blanks, or click blank then click option'
AElectronics
B'Electronics'
Celectronics
D"Electronics"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around text values.
Using double quotes instead of single quotes.
4fill in blank
hard

Fill both blanks to calculate total sales for 2023 in the 'Furniture' category.

Power BI
Furniture Sales 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1], Sales[Category] = [2])
Drag options to blanks, or click blank then click option'
A2023
B'Furniture'
C'Electronics'
D2022
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of filters.
Not quoting the category text.
5fill in blank
hard

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

Power BI
Clothing Sales West 2023 = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1], Sales[Category] = [2], Sales[Region] = [3])
Drag options to blanks, or click blank then click option'
A2022
B2023
C'Clothing'
D'West'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around text filters.
Using wrong year or region names.