Courseiva
Prepare the data →hardMultiple Choice

PL-300 Prepare the data Practice Question

During data refresh in Power BI, an error occurs: 'The column 'OrderID' of the table 'Orders' contains a duplicate value and this column is part of a primary key.' The table 'Orders' is imported from an Azure SQL database. What is the most likely cause of this error?

⚠ Common exam trap

Many candidates confuse a primary key violation with other common refresh errors like data type mismatches or query folding issues, but the error message's explicit reference to 'duplicate value' and 'primary key' directly points to source data duplication.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The source table has duplicate 'OrderID' values.

The error message explicitly states that the 'OrderID' column contains a duplicate value and is part of a primary key. In Power BI, when importing from a source like Azure SQL Database, the data model enforces uniqueness on primary key columns. If the source table has duplicate 'OrderID' values, the refresh fails because Power BI cannot maintain the required unique constraint.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The 'Orders' table was reordered in Power Query.

    Why it's wrong here

    Reordering columns in Power Query only changes the sequence of columns in the query output and the data model; it does not modify values, row counts, or the uniqueness of data in any column. Because freshness and integrity checks are based on values and keys, a cosmetic reorder cannot trigger a duplicate key violation. If a reorder were involved, the error would be unrelated to key constraints and would most likely appear as a column mapping issue instead.

  • ✗

    Data type mismatch between the source and Power BI.

    Why it's wrong here

    A data type mismatch between the source and Power BI would produce a type conversion or coercion error, such as 'Cannot convert value' or a null value being loaded, not a duplicate key error. Power BI's engine would attempt to cast the data to the target type, and a failure would halt the refresh with a different diagnostic. Even if multiple rows ended up with the same value after conversion, that would not be reported as a duplicate key unless the column was explicitly a key, and the error message would be different.

  • ✗

    A calculated column is referencing the 'Orders' table.

    Why it's wrong here

    A calculated column referencing the 'Orders' table—whether through RELATED, LOOKUPVALUE, or a simple DAX expression—is evaluated row by row and materialized after the table is loaded. It does not change the underlying keys, the row grain, or the uniqueness of existing columns; it only adds a new column based on current data. Therefore, it cannot introduce duplicate OrderID values or cause a primary key constraint violation. Errors from calculated columns are typically dependency or evaluation errors, not key uniqueness errors.

  • ✓

    The source table has duplicate 'OrderID' values.

    Why this is correct

    The 'Orders' table has a column designated as a key (likely OrderID) that must contain unique values for the model's relationships to work. When the refresh tries to load data, the VertiPaq engine checks uniqueness on that key; duplicate OrderID values in the source violate that constraint, causing the refresh to fail with a duplicate key error. This often happens when the source view or query returns repeated rows due to joins or missing DISTINCT, and it is the direct and primary cause of the reported error.

About these practice questions

One of 524 original PL-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.