0
0
Power BIbi_tool~10 mins

SUM and AVERAGE functions 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 the total sales using SUM.

Power BI
TotalSales = [1](Sales[Amount])
Drag options to blanks, or click blank then click option'
AMIN
BAVERAGE
CCOUNT
DSUM
Attempts:
3 left
💡 Hint
Common Mistakes
Using AVERAGE instead of SUM will calculate the average, not total.
Using COUNT counts rows, not sums values.
2fill in blank
medium

Complete the code to calculate the average sales amount.

Power BI
AverageSales = [1](Sales[Amount])
Drag options to blanks, or click blank then click option'
AMAX
BMIN
CAVERAGE
DSUM
Attempts:
3 left
💡 Hint
Common Mistakes
Using SUM will add values, not find the average.
Using MAX or MIN returns highest or lowest value, not average.
3fill in blank
hard

Fix the error in the measure to correctly sum the Quantity column.

Power BI
TotalQuantity = SUM([1])
Drag options to blanks, or click blank then click option'
ASales[Quantity]
BQuantity[Sales]
CQuantity
DSales.Quantity
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the column name without table causes errors.
Using dot notation like Sales.Quantity is not valid in DAX.
4fill in blank
hard

Fill both blanks to calculate the average sales amount for the year 2023.

Power BI
AverageSales2023 = CALCULATE([1](Sales[Amount]), Sales[Year] [2] 2023)
Drag options to blanks, or click blank then click option'
AAVERAGE
BSUM
C=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using SUM instead of AVERAGE will sum values, not average.
Using > instead of = will filter for years greater than 2023.
5fill in blank
hard

Fill all three blanks to create a measure that sums sales amount only for products with sales greater than 100.

Power BI
HighSales = CALCULATE([1](Sales[Amount]), Sales[Amount] [2] [3])
Drag options to blanks, or click blank then click option'
ASUM
B>
C100
DAVERAGE
Attempts:
3 left
💡 Hint
Common Mistakes
Using AVERAGE instead of SUM will calculate average, not total.
Using < instead of > will filter for sales less than 100.