What is the main reason to mark a table as a date table in Power BI?
Think about how Power BI uses date tables for calculations like year-to-date.
Marking a table as a date table tells Power BI to treat it as the official calendar. This enables time intelligence functions like TOTALYTD, SAMEPERIODLASTYEAR, and others to work properly.
Given a date table marked as a date table and a Sales table with a 'SalesAmount' column, what is the result of this measure for the year 2023?
Sales YTD = TOTALYTD(SUM(Sales[SalesAmount]), 'Date'[Date])
Assume the Sales table has these sales amounts by date:
- 2023-01-01: 100
- 2023-06-01: 200
- 2023-12-31: 300
- 2022-12-31: 50
What is the value of Sales YTD when filtered to year 2023?
YTD sums all sales from the start of the year to the current date in 2023.
The measure sums all sales in 2023: 100 + 200 + 300 = 600. The 2022 sale is excluded because the date table is marked and filters correctly.
You created a date table but forgot to mark it as a date table in Power BI. You use this measure:
Sales YTD = TOTALYTD(SUM(Sales[SalesAmount]), 'Date'[Date])
Why does this measure return blank values?
Think about how Power BI knows which table is the official calendar.
Without marking the date table, Power BI does not know which table to use for time intelligence calculations, so TOTALYTD returns blank.
You want to show monthly sales trends over a year using a date table marked as a date table. Which visualization type is best to clearly show this trend?
Think about which chart type best shows trends over time.
Line charts are best for showing trends over time, such as monthly sales. Pie charts and stacked bars are less effective for trends.
Your Sales table has two date columns: 'OrderDate' and 'ShipDate'. You have one date table marked as a date table. How do you model relationships to use time intelligence on both dates?
Power BI allows only one active relationship per table pair.
Only one active relationship can exist between tables. The other must be inactive and activated in DAX using USERELATIONSHIP for calculations on the second date.