Bird
Raised Fist0
Power BIbi_tool~20 mins

Calculated tables in Power BI - Practice Problems & Coding Challenges

Choose your learning style10 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.

Practice

(1/5)
1. What is the main purpose of a calculated table in Power BI?
easy
A. To create a new table based on a DAX formula without altering original data
B. To directly edit the source data in the database
C. To visualize data using charts and graphs
D. To export data to Excel automatically

Solution

  1. Step 1: Understand calculated tables

    Calculated tables are created using DAX formulas inside Power BI to generate new tables.
  2. Step 2: Compare with other options

    They do not edit source data, create visuals, or export data directly.
  3. Final Answer:

    To create a new table based on a DAX formula without altering original data -> Option A
  4. Quick Check:

    Calculated tables = new tables from DAX [OK]
Hint: Calculated tables create new data, not change original [OK]
Common Mistakes:
  • Confusing calculated tables with data editing
  • Thinking calculated tables create visuals
  • Assuming calculated tables export data
2. Which of the following is the correct syntax to create a calculated table named TopProducts showing top 5 products by sales?
easy
A. TopProducts = TOPN(5, Products, Products[Sales], DESC)
B. TopProducts = FILTER(Products, Products[Sales] > 5)
C. TopProducts = SUMMARIZE(Products, Products[ProductName])
D. TopProducts = CALCULATE(Products, TOPN(5))

Solution

  1. Step 1: Identify correct DAX function for top rows

    TOPN returns the top N rows based on a column, here top 5 by sales.
  2. Step 2: Check syntax correctness

    TopProducts = TOPN(5, Products, Products[Sales], DESC) uses TOPN(5, Products, Products[Sales], DESC) which is correct syntax for top 5 products by sales.
  3. Final Answer:

    TopProducts = TOPN(5, Products, Products[Sales], DESC) -> Option A
  4. Quick Check:

    TOPN syntax = TopProducts = TOPN(5, Products, Products[Sales], DESC) [OK]
Hint: Use TOPN for top rows with order [OK]
Common Mistakes:
  • Using FILTER instead of TOPN for top rows
  • Incorrect CALCULATE usage for tables
  • Missing order direction in TOPN
3. Given the calculated table:
HighSales = FILTER(Sales, Sales[Amount] > 1000)

What will HighSales contain?
medium
A. Sum of sales Amount greater than 1000
B. All sales records where Amount is less than 1000
C. Error because FILTER cannot be used in calculated tables
D. All sales records where Amount is greater than 1000

Solution

  1. Step 1: Understand FILTER function in calculated tables

    FILTER returns a table with rows meeting the condition, here Amount > 1000.
  2. Step 2: Analyze the condition

    It keeps only sales records where Amount is greater than 1000.
  3. Final Answer:

    All sales records where Amount is greater than 1000 -> Option D
  4. Quick Check:

    FILTER with condition = filtered rows [OK]
Hint: FILTER returns rows matching condition [OK]
Common Mistakes:
  • Thinking FILTER returns aggregated values
  • Confusing greater than with less than
  • Believing FILTER cannot create tables
4. You wrote this calculated table:
RecentSales = FILTER(Sales, Sales[Date] >= TODAY() - 30)

But it gives an error. What is the likely problem?
medium
A. Sales table cannot be filtered in calculated tables
B. FILTER requires aggregation functions inside
C. TODAY() cannot be used in calculated tables because it is dynamic
D. The date comparison operator >= is invalid in DAX

Solution

  1. Step 1: Understand TODAY() in calculated tables

    TODAY() is dynamic and calculated tables are static, so TODAY() causes error.
  2. Step 2: Check other options

    FILTER works without aggregation, >= is valid, and Sales can be filtered.
  3. Final Answer:

    TODAY() cannot be used in calculated tables because it is dynamic -> Option C
  4. Quick Check:

    Dynamic functions disallowed in calculated tables [OK]
Hint: Avoid dynamic functions like TODAY() in calculated tables [OK]
Common Mistakes:
  • Thinking FILTER needs aggregation
  • Misunderstanding comparison operators
  • Assuming all functions work in calculated tables
5. You want to create a calculated table CustomerSalesSummary that shows each customer and their total sales amount, but only for customers with sales above 5000. Which DAX expression correctly achieves this?
hard
A. CustomerSalesSummary = SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", FILTER(Sales[Amount] > 5000))
B. CustomerSalesSummary = FILTER(SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", SUM(Sales[Amount])), [TotalSales] > 5000)
C. CustomerSalesSummary = CALCULATETABLE(Sales, Sales[Amount] > 5000)
D. CustomerSalesSummary = SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", SUM(Sales[Amount])) WHERE TotalSales > 5000

Solution

  1. Step 1: Summarize sales by customer

    SUMMARIZE groups Sales by CustomerID and calculates total sales per customer.
  2. Step 2: Filter summarized table by total sales > 5000

    FILTER applies condition on the summarized table's TotalSales column.
  3. Step 3: Check syntax correctness

    CustomerSalesSummary = FILTER(SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", SUM(Sales[Amount])), [TotalSales] > 5000) correctly nests FILTER around SUMMARIZE with proper syntax.
  4. Final Answer:

    CustomerSalesSummary = FILTER(SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", SUM(Sales[Amount])), [TotalSales] > 5000) -> Option B
  5. Quick Check:

    SUMMARIZE then FILTER = CustomerSalesSummary = FILTER(SUMMARIZE(Sales, Sales[CustomerID], "TotalSales", SUM(Sales[Amount])), [TotalSales] > 5000) [OK]
Hint: Use SUMMARIZE then FILTER for grouped filtered tables [OK]
Common Mistakes:
  • Placing FILTER inside SUMMARIZE incorrectly
  • Using WHERE clause which is invalid in DAX
  • Applying CALCULATETABLE without grouping
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard