Question 799 of 966
Prepare the datamediumMultiple ChoiceObjective-mapped

Quick Answer

The correct approach is to create a date dimension table in Power Query using the List.Dates function with a blank query, then load it and mark it as a date table. This is the only method that directly satisfies the requirement to use M code for generating a continuous date range from 2010 to 2030, as List.Dates is the native Power Query function for creating sequential date lists. On the PL-300 exam, this scenario tests your ability to distinguish between creating a date table in Power Query versus DAX—a common trap is using CALENDAR or CALENDARAUTO in DAX, which would not meet the explicit “M code” requirement. The exam also emphasizes that marking the table as a date table is essential for enabling time intelligence functions like TOTALYTD. Memory tip: think “List.Dates for M, CALENDAR for DAX”—if the prompt says “Power Query” or “M code,” always choose List.Dates.

PL-300 Prepare the data Practice Question

This PL-300 practice question tests your understanding of prepare the data. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are a Power BI developer for a healthcare organization. You are building a dataset that includes patient data from an on-premises SQL Server database. The database contains a table 'PatientVisits' with columns: PatientID, VisitDate, DiagnosisCode, and Cost. The database also has a table 'DiagnosisLookup' with DiagnosisCode and Description. You need to create a star schema in Power BI. The requirements are: - The dataset must include a date dimension table that covers all dates from 2010 to 2030. - The 'PatientVisits' table should be the fact table. - Diagnosis descriptions should be in a dimension table. - You must use Power Query to create the date dimension table using M code. - The data refresh must be scheduled daily via the on-premises data gateway.

You have already loaded the 'PatientVisits' and 'DiagnosisLookup' tables. What should you do next to complete the star schema?

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

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

In Power Query, create a blank query that generates a date table using the List.Dates function with a custom column for Year, Month, etc. Load it into the model and mark it as a date table.

Option D is correct because the requirement explicitly states that the date dimension table must be created using M code in Power Query, and the List.Dates function is the appropriate M function to generate a continuous range of dates from 2010 to 2030. After creating the table with additional columns like Year and Month, you must load it into the model and mark it as a date table to enable time intelligence functions. This approach satisfies the need for a custom date dimension that is not dependent on DAX or auto-generated hierarchies.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Use DAX to create a date table using CALENDAR function in Power BI Desktop, then mark it as a date table.

    Why it's wrong here

    While viable, the requirement specifies using Power Query, not DAX. Also, this approach is valid but not what is asked.

  • Enable the 'Auto date/time' option in Power BI Desktop and hide the generated date hierarchy.

    Why it's wrong here

    Auto date/time creates hidden date tables, but they are not a true dimension table and cannot be used for relationships with multiple fact tables.

  • In the model view, create a relationship between PatientVisits[VisitDate] and DiagnosisLookup[DiagnosisCode].

    Why it's wrong here

    This is incorrect because you need a date dimension, not a relationship between VisitDate and DiagnosisCode.

  • In Power Query, create a blank query that generates a date table using the List.Dates function with a custom column for Year, Month, etc. Load it into the model and mark it as a date table.

    Why this is correct

    This creates a proper date dimension in Power Query, which can be used for relationships.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often default to using DAX's CALENDAR function (Option A) because it is simpler, but the question explicitly requires M code in Power Query, making DAX-based solutions incorrect even if functionally equivalent.

Detailed technical explanation

How to think about this question

When using List.Dates in Power Query, you specify a start date, a count of days, and a step duration; for a 20-year range from 2010 to 2030, you would calculate the count as (2030-2010)*365 plus leap days, or use a more robust approach with List.Generate to handle leap years accurately. Marking the table as a date table in Power BI ensures that time intelligence functions like TOTALYTD or SAMEPERIODLASTYEAR work correctly by recognizing the date column as the primary date key. In a real-world healthcare scenario, this date dimension would also include fiscal year, week number, and holiday flags to support complex reporting on patient visit trends.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PL-300 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PL-300 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PL-300 question test?

Prepare the data — This question tests Prepare the data — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: In Power Query, create a blank query that generates a date table using the List.Dates function with a custom column for Year, Month, etc. Load it into the model and mark it as a date table. — Option D is correct because the requirement explicitly states that the date dimension table must be created using M code in Power Query, and the List.Dates function is the appropriate M function to generate a continuous range of dates from 2010 to 2030. After creating the table with additional columns like Year and Month, you must load it into the model and mark it as a date table to enable time intelligence functions. This approach satisfies the need for a custom date dimension that is not dependent on DAX or auto-generated hierarchies.

What should I do if I get this PL-300 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on PL-300

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You are building a Power BI semantic model that uses a large fact table from a data warehouse. The fact table has a date column and you want to create a date dimension. The organization requires that the date dimension includes all dates from 2010 to 2030, including weekends and holidays. What is the best practice for creating the date dimension?

hard
  • A.Use the CALENDAR function in DAX to generate the date range
  • B.Mark the date column from the fact table as a date table and disable Auto Date/Time
  • C.Create a date dimension by using DISTINCT on the fact table's date column
  • D.Create a date table in Power Query by generating a list of dates from 1/1/2010 to 12/31/2030 and then add columns for attributes

Why D: Option D is correct because it follows the best practice of creating a dedicated date dimension table in Power Query, which ensures full control over the date range (2010–2030) and allows you to add custom attributes like holidays. This approach avoids relying on the fact table's date column, which may have gaps or missing dates, and ensures the date dimension is complete and independent for robust time intelligence calculations.

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.