0
0
Power BIbi_tool~20 mins

Date table creation in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Date Table Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
1:30remaining
Calculate the number of days in the Date table
Given a Date table created with the following DAX expression:

Date = CALENDAR(DATE(2023,1,1), DATE(2023,12,31))

What is the result of the measure:

DayCount = COUNTROWS(Date)

?
Power BI
Date = CALENDAR(DATE(2023,1,1), DATE(2023,12,31))
DayCount = COUNTROWS(Date)
A0
B364
C366
D365
Attempts:
2 left
💡 Hint
Remember that 2023 is not a leap year.
data_modeling
intermediate
1:30remaining
Identify the correct way to add a Month Name column to a Date table
You have a Date table with a column [Date]. You want to add a calculated column that shows the full month name (e.g., "January", "February"). Which DAX expression correctly creates this column?
AMonthName = FORMAT(Date[Date], "MMMM")
BMonthName = DAY(Date[Date])
CMonthName = YEAR(Date[Date])
DMonthName = MONTH(Date[Date])
Attempts:
2 left
💡 Hint
Use FORMAT to convert dates to text month names.
visualization
advanced
1:30remaining
Best visualization to show sales trend by month using a Date table
You have a Date table with a Month column and a Sales table with daily sales. You want to create a report showing total sales trend by month over a year. Which visualization type is best suited for this?
AStacked Bar Chart
BLine Chart
CPie Chart
DScatter Plot
Attempts:
2 left
💡 Hint
Think about showing trends over time.
🎯 Scenario
advanced
2:00remaining
Handling missing dates in a sales dataset using a Date table
Your sales data has missing dates for some days with no sales. You want to create a report that shows daily sales including zero sales for missing dates. How can a Date table help you achieve this?
ACreate a calculated column in sales to fill missing dates with zeros.
BFilter the sales table to remove missing dates before creating the report.
CUse the Date table as the axis and create a relationship to sales; use a measure that returns zero for missing sales dates.
DUse only the sales table without a Date table to avoid missing dates.
Attempts:
2 left
💡 Hint
Think about how Date tables provide a continuous timeline.
🔧 Formula Fix
expert
1:30remaining
Identify the error in this Date table creation DAX expression
You wrote this DAX to create a Date table:

Date = CALENDAR(DATE(2023,1,1), DATE(2023,12,32))

What error will Power BI show when you try to create this table?
Power BI
Date = CALENDAR(DATE(2023,1,1), DATE(2023,12,32))
AError: The day value 32 is invalid for month 12.
BNo error, table created with dates until December 31, 2023.
CError: Missing closing parenthesis.
DError: CALENDAR function requires text arguments.
Attempts:
2 left
💡 Hint
Check the date arguments carefully.