In a Power BI Desktop model, you import a million-row fact table named SensorReadings with columns DeviceId, ReadingDateTime (datetime), and TemperatureC. You must add a slicer that lists only distinct calendar dates (no time component) and supports DAX time-intelligence functions such as SAMEPERIODLASTYEAR. You also want to avoid ambiguous relationships that could arise from having date columns inside the fact table. Which DAX definition should you use to create the required object?
Calendar = CALENDAR ( MIN ( SensorReadings[ReadingDateTime] ), MAX ( SensorReadings[ReadingDateTime] ) )
Time-intelligence functions work only against a dedicated date table that contains one row per day and spans a continuous range of dates. The expression that uses CALENDAR together with MIN and MAX from SensorReadings creates such a contiguous date table covering exactly the range present in the fact data. Once marked as a date table, it supports all built-in time-intelligence calculations and links to fact tables through a single relationship. Adding a calculated column inside SensorReadings leaves the model without a true date dimension and can create relationship ambiguity. Building a table with DISTINCT or SELECTCOLUMNS risks skipping days with no readings, breaking the continuity requirement. CALENDARAUTO generates a proper calendar but may include additional years from other tables, so it does not guarantee that the slicer shows only dates from SensorReadings.
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.
What does the CALENDAR function do in DAX?
Open an interactive chat with Bash
Why is a dedicated date table important for time-intelligence functions in Power BI?
Open an interactive chat with Bash
What issues arise from using DISTINCT or SELECTCOLUMNS for building a calendar in DAX?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Model 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 .