0
0
Power BIbi_tool~20 mins

Role-playing dimensions in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Role-Playing Dimensions Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Role-Playing Dimensions

In a sales data model, the 'Date' dimension is used multiple times for different purposes like 'Order Date', 'Ship Date', and 'Due Date'. What is the main reason to use role-playing dimensions in this scenario?

ATo create separate physical tables for each date type to avoid confusion.
BTo merge all date columns into one column to simplify the model.
CTo reuse the same dimension table multiple times with different relationships for each role.
DTo remove duplicate date values from the fact table.
Attempts:
2 left
💡 Hint

Think about how the same dimension can represent different meanings depending on context.

dax_lod_result
intermediate
2:00remaining
DAX Measure with Role-Playing Dimension

Given a sales model with a single 'Date' dimension used as 'Order Date' and 'Ship Date', which DAX measure correctly calculates total sales amount filtered by 'Ship Date'?

Power BI
Total Sales by Ship Date = CALCULATE(SUM(Sales[Amount]), USERELATIONSHIP(Sales[ShipDateKey], 'Date'[DateKey]))
ATotal Sales by Ship Date = CALCULATE(SUM(Sales[Amount]), USERELATIONSHIP(Sales[ShipDateKey], 'Date'[DateKey]))
BTotal Sales by Ship Date = CALCULATE(SUM(Sales[Amount]), 'Date'[DateKey] = Sales[ShipDateKey])
CTotal Sales by Ship Date = CALCULATE(SUM(Sales[Amount]), FILTER('Date', 'Date'[DateKey] = Sales[ShipDateKey]))
DTotal Sales by Ship Date = SUM(Sales[Amount])
Attempts:
2 left
💡 Hint

Think about how to activate an inactive relationship in DAX.

visualization
advanced
3:00remaining
Visualizing Role-Playing Dimensions in Power BI

You have a sales report with 'Order Date' and 'Ship Date' role-playing dimensions from the same 'Date' table. You want to create a line chart showing monthly sales by 'Order Date' and a separate line chart showing monthly sales by 'Ship Date'. What is the best practice to ensure correct filtering in each chart?

ACreate two separate date slicers, each connected to the respective role-playing relationship, and sync them.
BUse disconnected slicers and DAX measures with USERELATIONSHIP to filter each chart correctly.
CUse the same date slicer connected to both charts to filter both by the same date.
DUse one date slicer and apply visual-level filters to each chart to switch between 'Order Date' and 'Ship Date'.
Attempts:
2 left
💡 Hint

Consider how slicers interact with inactive relationships and measures.

🔧 Formula Fix
advanced
2:30remaining
Debugging Incorrect Sales Totals with Role-Playing Dimensions

A report shows total sales by 'Ship Date' but the numbers are the same as 'Order Date' sales. The model uses a single 'Date' table with two relationships: one active for 'Order Date' and one inactive for 'Ship Date'. The measure is:

Total Sales Ship Date = SUM(Sales[Amount])

Why is the measure showing incorrect results?

AThe measure does not activate the inactive 'Ship Date' relationship, so it uses the active 'Order Date' relationship by default.
BThe measure should use FILTER instead of SUM to calculate totals.
CThe 'Date' table is missing the 'Ship Date' column, so filtering fails.
DThe 'Ship Date' relationship is incorrectly set as active, causing conflicts.
Attempts:
2 left
💡 Hint

Think about which relationship is active by default in Power BI.

🎯 Scenario
expert
3:00remaining
Designing a Role-Playing Dimension Strategy for Multiple Date Roles

Your company tracks orders with multiple date roles: 'Order Date', 'Ship Date', 'Invoice Date', and 'Payment Date'. You have a single 'Date' dimension table. You need to build a Power BI model that allows users to analyze sales by any of these dates with slicers and visuals. Which approach best supports this requirement?

ACreate one 'Date' table and duplicate it three times as calculated tables for other date roles, linking each with active relationships.
BCreate four separate physical date tables, one for each date role, and link each to the fact table with active relationships.
CUse one 'Date' table with a single active relationship to 'Order Date' and ignore other date roles in analysis.
DUse one 'Date' table with multiple inactive relationships to the fact table, and create DAX measures using USERELATIONSHIP for each date role analysis.
Attempts:
2 left
💡 Hint

Consider model simplicity and flexibility for multiple date roles.