0
0
Power BIbi_tool~20 mins

SUM and AVERAGE functions in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SUM and AVERAGE Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate total sales for each product category

You have a sales table with columns ProductCategory and SalesAmount. Which DAX measure correctly calculates the total sales for each product category?

ATotal Sales = SUM(Sales[SalesAmount])
BTotal Sales = AVERAGE(Sales[SalesAmount])
CTotal Sales = SUM(Sales[ProductCategory])
DTotal Sales = SUMX(Sales, Sales[ProductCategory])
Attempts:
2 left
💡 Hint

Think about which function adds numbers and which averages them.

visualization
intermediate
2:00remaining
Best visualization for average sales per region

You want to show the average sales amount per region in a report. Which visualization type is best to clearly communicate this?

APie chart showing count of sales transactions per region
BClustered column chart showing average sales per region
CStacked bar chart showing total sales per region
DLine chart showing average sales per region over time
Attempts:
2 left
💡 Hint

Choose a chart that compares average values across categories clearly.

data_modeling
advanced
2:00remaining
Create a measure to calculate average sales per customer

You have a Sales table with SalesAmount and a Customers table with unique CustomerID. Which DAX measure correctly calculates the average sales per customer?

AAvg Sales per Customer = SUMX(Customers, AVERAGE(Sales[SalesAmount]))
BAvg Sales per Customer = AVERAGE(Sales[SalesAmount]) / DISTINCTCOUNT(Customers[CustomerID])
CAvg Sales per Customer = SUM(Sales[SalesAmount]) / DISTINCTCOUNT(Sales[CustomerID])
DAvg Sales per Customer = DIVIDE(SUM(Sales[SalesAmount]), DISTINCTCOUNT(Sales[CustomerID]))
Attempts:
2 left
💡 Hint

Think about dividing total sales by number of unique customers.

🔧 Formula Fix
advanced
2:00remaining
Identify error in average sales measure

Consider this DAX measure to calculate average sales:

Average Sales = AVERAGE(Sales[SalesAmount]) + SUM(Sales[Quantity])

What is the main issue with this measure?

Power BI
Average Sales = AVERAGE(Sales[SalesAmount]) + SUM(Sales[Quantity])
ASUM cannot be used with Quantity column
BSyntax error due to missing parentheses
CIt mixes average and sum, causing misleading results
DAVERAGE function requires two arguments
Attempts:
2 left
💡 Hint

Check if adding average and sum makes sense mathematically.

🧠 Conceptual
expert
2:00remaining
Understanding filter context impact on SUM and AVERAGE

In Power BI, you have a measure Total Sales = SUM(Sales[SalesAmount]) and a measure Average Sales = AVERAGE(Sales[SalesAmount]). When you add a slicer filtering only one product, what happens to these measures?

ABoth measures recalculate only for the selected product, showing filtered total and average
BAverage Sales stays the same, Total Sales recalculates for selected product
CTotal Sales stays the same, Average Sales recalculates for selected product
DNeither measure changes because slicers do not affect measures
Attempts:
2 left
💡 Hint

Think about how slicers change the data visible to measures.