You are a data analyst modeling sales data in Power BI. You start by connecting to a single, denormalized table named 'SalesData' in Power Query. This table contains columns for transactional values (e.g., 'SaleAmount', 'Quantity') and descriptive attributes for customers, products, and dates (e.g., 'CustomerName', 'ProductCategory', 'OrderDate'). To optimize the data model for performance and analysis, you need to transform this flat table into a star schema consisting of a central fact table and multiple dimension tables. Which sequence of actions in Power Query correctly creates the dimension tables and prepares the fact table?
First, in the 'SalesData' query, remove all descriptive text columns like 'CustomerName' and 'ProductCategory'. Then, duplicate the modified 'SalesData' query to create dimension tables.
Append the 'SalesData' query with separate queries created for customers and products. Then, use the 'Group By' feature to summarize sales by customer and product to create the final table.
Create new queries that reference 'SalesData' for each dimension. In each new dimension query, keep only the relevant descriptive columns and remove duplicates. Then, merge the 'SalesData' query with the new dimension queries to add their key columns and remove the original descriptive columns from 'SalesData'.
Split the 'SalesData' query into multiple tables using the 'Split Column' transformation based on customer and product information. Then, define relationships between the newly created tables in the model view.
The correct process involves creating dimension tables from the main query and then using those dimensions to prepare the final fact table. First, you should create new queries that reference the original 'SalesData' query for each dimension you want to create (e.g., 'DimCustomer', 'DimProduct'). Using 'Reference' is efficient as it creates a dependency on the source query without duplicating the data in memory. In each of these new dimension queries, you isolate the relevant columns (e.g., 'CustomerName' for 'DimCustomer'), remove all other columns, and then remove duplicate rows to create a unique list of dimension members. It is a best practice to add a unique index column (surrogate key) to each dimension table. After the dimensions are created, you return to the 'SalesData' query, which will serve as your fact table. You merge this query with each new dimension table to bring in their surrogate keys. Finally, you remove the original, now-redundant descriptive columns (e.g., 'CustomerName', 'ProductCategory') from the fact table, leaving only the foreign keys and the numeric measures.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is it important to transform a flat table into a star schema in Power BI?
Open an interactive chat with Bash
What does 'referencing' a query in Power Query mean, and why is it used?
Open an interactive chat with Bash
What is a surrogate key in a dimension table, and why is it recommended?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Prepare the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .