You are designing a Power BI solution for a retail company. The data includes point-of-sale transactions with columns: TransactionID, StoreID, ProductID, Quantity, SalesAmount, TransactionDate. The company wants to analyze sales by hour of day. What is the best way to prepare the time dimension?
Creating a separate Time dimension table with a TimeKey (for example, an integer 0–86399 representing seconds since midnight) and attributes such as hour, half-hour slot, and time band, then relating it to the fact table via a one-to-many relationship, gives every measure a consistent, reusable way to slice and drill by time of day. This follows star-schema best practice: the dimension stores the descriptive time attributes, the fact only stores the key, and users can navigate from hour to minute or across time periods without custom DAX. It fully supports the retail requirement of analyzing sales by hour while integrating cleanly with the date dimension.
Why this answer
Creating a separate Time dimension table with a one-to-many relationship to the fact table follows the star schema best practice for Power BI. This approach allows efficient filtering and grouping by hour without bloating the fact table with calculated columns, and it supports time-based analysis across multiple fact tables if needed. The Time dimension can include columns like Hour, HourBucket, or PeriodOfDay, enabling intuitive slicers and drill-downs.
Exam trap
The trap here is that candidates often think extracting the hour via a calculated column (Option A) is simpler and sufficient, but they overlook the performance and scalability benefits of a proper star schema with a separate Time dimension, which is a core concept tested in PL-300.
How to eliminate wrong answers
Option A is wrong because adding a calculated column to the fact table to extract hour increases storage and processing overhead, and it violates star schema principles by mixing dimensions into the fact table. Option B is wrong because ignoring time entirely fails to meet the requirement to analyze sales by hour of day, as a date-only dimension cannot support hourly granularity. Option C is wrong because using DAX measures to extract hour on the fly is inefficient for repeated calculations in visuals, can degrade performance with large datasets, and prevents the use of time-based hierarchies or slicers.