Adjusting the calendar

Pam only wants dates that are contained within the report to be displayed in the Dates slicer. When Pam originally created the Calendar table, she used the CALENDAR function and used 1/1/2017 and 12/31/2019 as the beginning and end dates for the CALENDAR function's parameters. This means that the Dates slicer displays all of these dates. This will not do for the final report.

To fix this, click on the Calendar table and edit the DAX formula definition so that it's now as follows: 

Calendar = CALENDAR( MIN(Hours[Date]), MAX(Hours[Date]) )

This formula replaces the hardcoded date values with the minimum and maximum date values in the Hours table. The Dates slicer now only has available dates of 1/1/2019 to 3/22/2019. Pam knows that when she adds data to the report, this table will be recalculated during the refresh and thus the report's Dates slicer will always have only the dates that are available within the data model.

The CALENDARAUTO function can also help to ensure that all of the calendar dates within the model are part of the calendar table. CALENDARAUTO is similar to CALENDAR in that it creates a table of dates, but CALENDARAUTO analyzes the data model and creates the calendar table between the minimum and maximum dates within the model.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.185.221