0
0
Power BIbi_tool~20 mins

Calculated tables in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Calculated Tables Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate a table with unique customers
Given a Sales table with multiple rows per customer, which DAX expression creates a calculated table with unique Customer IDs?
Power BI
Sales = DATATABLE(
    "CustomerID", INTEGER,
    { {1}, {2}, {1}, {3}, {2} }
)

-- Which calculated table expression returns unique CustomerIDs?
AUniqueCustomers = FILTER(Sales, Sales[CustomerID] <> BLANK())
BUniqueCustomers = DISTINCT(Sales[CustomerID])
CUniqueCustomers = VALUES(Sales[CustomerID])
DUniqueCustomers = ALL(Sales[CustomerID])
Attempts:
2 left
💡 Hint

Think about which function returns a table of unique values from a column.

visualization
intermediate
2:00remaining
Best visualization for a calculated table showing monthly sales totals
You created a calculated table with monthly sales totals per product. Which visualization best shows trends over time for multiple products?
AStacked column chart with months on X-axis and sales on Y-axis
BTable visual listing months and sales values
CLine chart with months on X-axis and sales on Y-axis, one line per product
DPie chart showing total sales per product for all months combined
Attempts:
2 left
💡 Hint

Think about which chart type best shows trends over time for multiple categories.

data_modeling
advanced
2:30remaining
Creating a calculated table to summarize sales by region and year
You have a Sales table with columns: Region, Year, and SalesAmount. Which DAX expression creates a calculated table summarizing total sales by Region and Year?
ASummary = SUMMARIZE(Sales, Sales[Region], Sales[Year], "TotalSales", SUM(Sales[SalesAmount]))
BSummary = GROUPBY(Sales, Sales[Region], Sales[Year], "TotalSales", SUMX(CURRENTGROUP(), Sales[SalesAmount]))
CSummary = ADDCOLUMNS(Sales, "TotalSales", SUM(Sales[SalesAmount]))
DSummary = FILTER(Sales, Sales[SalesAmount] > 0)
Attempts:
2 left
💡 Hint

Consider which function groups rows and calculates aggregations in a new table.

🔧 Formula Fix
advanced
2:00remaining
Identify the error in this calculated table expression
What error will this DAX calculated table expression cause? NewTable = FILTER(Sales, Sales[Quantity] > 10, Sales[Price] < 100)
Power BI
NewTable = FILTER(Sales, Sales[Quantity] > 10, Sales[Price] < 100)
ASyntaxError: FILTER only accepts two arguments
BNo error, returns filtered table with Quantity > 10 and Price < 100
CTypeError: Sales[Price] is not a valid column
DRuntimeError: FILTER cannot be used in calculated tables
Attempts:
2 left
💡 Hint

Check the number of arguments FILTER accepts.

🧠 Conceptual
expert
3:00remaining
Understanding row context in calculated tables
In a calculated table expression using ADDCOLUMNS over a Sales table, you add a column with the expression: TotalCustomerSales = CALCULATE(SUM(Sales[SalesAmount]), ALLEXCEPT(Sales, Sales[CustomerID])) What does this expression compute for each row in the new table?
ATotal sales for all customers except the current CustomerID
BTotal sales for the current row only
CTotal sales ignoring all filters including CustomerID
DTotal sales for the current CustomerID across all other filters
Attempts:
2 left
💡 Hint

Think about what ALLEXCEPT does inside CALCULATE.