Bird
Raised Fist0
Power BIbi_tool~20 mins

Data model best practices in Power BI - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Data Model Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Star Schema Benefits

Which of the following is the main advantage of using a star schema in a Power BI data model?

AIt duplicates data across multiple tables to increase redundancy.
BIt stores all data in one large table to avoid joins.
CIt simplifies queries and improves performance by having a central fact table connected to dimension tables.
DIt uses many-to-many relationships extensively to connect tables.
Attempts:
2 left
💡 Hint

Think about how organizing data affects query speed and simplicity.

❓ dax_lod_result
intermediate
2:00remaining
Calculating Total Sales by Region with Filter

Given a Sales table with columns Region and SalesAmount, which DAX measure correctly calculates total sales only for the 'West' region?

ATotalSalesWest = CALCULATE(SUM(Sales[SalesAmount]), FILTER(Sales, Sales[Region] = "West"))
BTotalSalesWest = CALCULATE(SUM(Sales[SalesAmount]), Sales[Region] = "West")
CTotalSalesWest = SUMX(FILTER(Sales, Sales[Region] = "West"), Sales[SalesAmount])
DTotalSalesWest = SUM(Sales[SalesAmount]) WHERE Sales[Region] = "West"
Attempts:
2 left
💡 Hint

Remember that CALCULATE needs a filter expression or a filter table.

❓ visualization
advanced
2:00remaining
Best Visualization for Showing Sales Trends Over Time

You want to show how sales change month by month for the last year. Which visualization type is best suited for this purpose in Power BI?

ALine chart with months on the x-axis and sales on the y-axis.
BStacked bar chart showing sales by product category.
CPie chart showing sales distribution by region.
DTable listing sales amounts for each month.
Attempts:
2 left
💡 Hint

Think about which chart type best shows changes over time.

🔧 Formula Fix
advanced
2:00remaining
Fixing a Relationship Cardinality Issue

You created a relationship between a Customers table and an Orders table in Power BI. The relationship is set as one-to-one, but you notice incorrect aggregation results. What is the most likely cause?

AThe relationship should be inactive to avoid aggregation errors.
BThe relationship should be one-to-many from Customers to Orders, not one-to-one.
CThe relationship should be many-to-many to allow multiple customers per order.
DThe relationship cardinality does not affect aggregation results.
Attempts:
2 left
💡 Hint

Think about how customers and orders relate in real life.

🎯 Scenario
expert
3:00remaining
Optimizing a Large Data Model for Performance

Your Power BI report is slow because the data model has millions of rows and many calculated columns. Which approach will best improve performance without losing necessary detail?

AImport all data without filtering to keep the model complete.
BAdd more calculated columns to pre-calculate values and speed up queries.
CDisable relationships to reduce model complexity.
DReplace calculated columns with measures where possible and use aggregations to reduce data volume.
Attempts:
2 left
💡 Hint

Think about how calculated columns and measures affect model size and query speed.

Practice

(1/5)
1. What is the main reason to use a star schema in Power BI data modeling?
easy
A. It hides data from users to improve security.
B. It allows storing all data in one big table.
C. It automatically creates relationships without keys.
D. It simplifies analysis by separating facts and dimensions clearly.

Solution

  1. Step 1: Understand star schema purpose

    A star schema organizes data into fact tables (measures) and dimension tables (descriptions) for clarity.
  2. Step 2: Recognize benefits in Power BI

    This separation makes analysis easier and faster by simplifying relationships and queries.
  3. Final Answer:

    It simplifies analysis by separating facts and dimensions clearly. -> Option D
  4. Quick Check:

    Star schema = clear fact and dimension tables [OK]
Hint: Star schema means clear fact and dimension tables [OK]
Common Mistakes:
  • Thinking all data should be in one table
  • Believing relationships form without keys
  • Confusing star schema with security features
2. Which of the following is the correct way to create a one-to-many relationship in Power BI?
easy
A. Link the primary key in the dimension table to the foreign key in the fact table.
B. Link the foreign key in the dimension table to the primary key in the fact table.
C. Create a many-to-many relationship between two fact tables.
D. Use a calculated column to join unrelated tables.

Solution

  1. Step 1: Identify keys in tables

    The dimension table has a primary key; the fact table has a foreign key referencing it.
  2. Step 2: Create relationship direction

    One-to-many means one dimension row links to many fact rows, so connect primary key (dimension) to foreign key (fact).
  3. Final Answer:

    Link the primary key in the dimension table to the foreign key in the fact table. -> Option A
  4. Quick Check:

    One-to-many = primary key to foreign key [OK]
Hint: Primary key (dimension) links to foreign key (fact) [OK]
Common Mistakes:
  • Reversing keys in relationship
  • Using many-to-many where one-to-many is needed
  • Trying to join unrelated tables with calculated columns
3. Given a data model with a Sales fact table and a Product dimension table linked by ProductID, what happens if you add a relationship from Sales[ProductID] to Product[ProductID] but the Product table has duplicate ProductIDs?
medium
A. Power BI will create a one-to-many relationship and filter correctly.
B. Power BI will show an error and not allow the relationship.
C. Power BI will create a many-to-many relationship automatically.
D. Power BI will ignore duplicates and create the relationship anyway.

Solution

  1. Step 1: Understand relationship requirements

    One-to-many relationships require the 'one' side (Product) to have unique keys.
  2. Step 2: Check effect of duplicates

    Duplicates in Product[ProductID] break uniqueness, so Power BI blocks the relationship creation.
  3. Final Answer:

    Power BI will show an error and not allow the relationship. -> Option B
  4. Quick Check:

    Unique keys required on 'one' side [OK]
Hint: One side keys must be unique to create relationship [OK]
Common Mistakes:
  • Assuming duplicates are ignored
  • Expecting automatic many-to-many creation
  • Thinking relationship will still filter correctly
4. You created a relationship between Customer[CustomerID] and Sales[CustomerID], but your report shows incorrect totals. Which of the following is the most likely cause?
medium
A. The Sales table is missing CustomerID values.
B. CustomerID has duplicates in the Customer table.
C. The relationship is inactive and needs to be activated.
D. The relationship is many-to-many instead of one-to-many.

Solution

  1. Step 1: Check relationship status

    Inactive relationships do not filter data automatically, causing wrong totals.
  2. Step 2: Confirm activation needed

    Activating the relationship or using DAX USERELATIONSHIP fixes filtering issues.
  3. Final Answer:

    The relationship is inactive and needs to be activated. -> Option C
  4. Quick Check:

    Inactive relationship causes wrong totals [OK]
Hint: Inactive relationships block filtering; activate them [OK]
Common Mistakes:
  • Ignoring inactive relationship status
  • Assuming duplicates always cause wrong totals
  • Thinking missing values break relationships
5. You have a complex data model with multiple fact tables and dimension tables. To improve performance and clarity, which best practice should you apply?
hard
A. Use a star schema with clear one-to-many relationships and avoid circular dependencies.
B. Combine all tables into one large table to reduce relationships.
C. Create many-to-many relationships between all tables for flexibility.
D. Use calculated columns to join tables instead of relationships.

Solution

  1. Step 1: Identify best modeling approach

    Star schema organizes data clearly with fact and dimension tables linked by one-to-many relationships.
  2. Step 2: Avoid common pitfalls

    Combining tables or many-to-many relationships can cause confusion and slow performance; calculated columns for joins are inefficient.
  3. Final Answer:

    Use a star schema with clear one-to-many relationships and avoid circular dependencies. -> Option A
  4. Quick Check:

    Star schema + one-to-many + no circular dependencies [OK]
Hint: Star schema and one-to-many improve clarity and speed [OK]
Common Mistakes:
  • Merging all tables into one
  • Using many-to-many everywhere
  • Relying on calculated columns for joins
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