0
0
Power BIbi_tool~20 mins

Optimizing DAX queries in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DAX Optimization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate Total Sales Using SUMX with FILTER
Given a Sales table with columns [Product], [Quantity], and [Price], which DAX measure correctly calculates the total sales only for products with Quantity greater than 10?
ATotal Sales = SUMX(FILTER(Sales, Sales[Quantity] > 10), Sales[Quantity] * Sales[Price])
BTotal Sales = SUMX(Sales, IF(Sales[Quantity] > 10, Sales[Quantity] * Sales[Price], 0))
CTotal Sales = CALCULATE(SUMX(Sales, Sales[Quantity] * Sales[Price]), Sales[Quantity] > 10)
DTotal Sales = SUMX(Sales, Sales[Quantity] * Sales[Price])
Attempts:
2 left
💡 Hint
Use FILTER to limit rows before calculation.
visualization
intermediate
1:30remaining
Best Visualization for Showing Sales Trend Over Time
You want to show how total sales change month by month over the last year. Which visualization type is best to clearly show this trend?
AStacked Bar Chart
BLine Chart
CPie Chart
DScatter Plot
Attempts:
2 left
💡 Hint
Think about how to show changes over time clearly.
data_modeling
advanced
2:30remaining
Optimizing Relationships for Faster DAX Queries
You have two large tables: Customers and Sales. You want to optimize DAX queries that calculate sales by customer region. Which relationship setup improves performance the most?
ACreate no relationship and use LOOKUPVALUE in measures
BCreate a many-to-many relationship between Customers and Sales on CustomerID with both directions filtering
CCreate a one-to-one relationship between Customers and Sales on CustomerID with single direction filtering
DCreate a one-to-many relationship from Customers to Sales on CustomerID with single direction filtering
Attempts:
2 left
💡 Hint
Think about how relationships filter data efficiently.
🔧 Formula Fix
advanced
2:00remaining
Identify the Error in This DAX Measure
What error will this DAX measure cause?

Average Sales = AVERAGE(Sales[Quantity] * Sales[Price])
Power BI
Average Sales = AVERAGE(Sales[Quantity] * Sales[Price])
ATypeError: AVERAGE expects a single column, not an expression
BSyntaxError: Cannot multiply columns inside AVERAGE
CNo error, returns average sales amount
DRuntimeError: Division by zero
Attempts:
2 left
💡 Hint
Check what AVERAGE function accepts as input.
🧠 Conceptual
expert
1:30remaining
Why Use Variables in Complex DAX Measures?
What is the main benefit of using variables (VAR) inside complex DAX measures?
AVariables automatically create new columns in the data model
BVariables allow storing data outside the model for faster access
CVariables improve readability and avoid repeated calculations, boosting performance
DVariables replace the need for relationships between tables
Attempts:
2 left
💡 Hint
Think about how variables help inside a formula.