- Saturday, January 02, 2021
You can generate a date table in your model by creating a calculated table using either the CALENDAR or CALENDARAUTO DAX functions. Power BI Calendar Table with Weeks, Month, & Year. Creating the Date Dimension in Power BI.
Calendar = VAR BaseCalendar = CALENDAR ( DATE ( 2018, 8, 1 ), DATE ( 2020, 12, 31 ) ) RETURN GENERATE ( BaseCalendar, VAR BaseDate = [Date] VAR YearDate = YEAR (BaseDate) VAR MonthNumber = MONTH (BaseDate) VAR WeekNumber = WEEKNUM (BaseDate) VAR WeekDay = WEEKDAY (BaseDate) RETURN ROW ( "Day", BaseDate, "Month", FORMAT (BaseDate, "mmmm"), "Month Number", MonthNumber, "Year", YearDate, "Year Month", FORMAT ( BaseDate, "yy/mm" ), "Week Number", WeekNumber, "Week Day", FORMAT(BaseDate, "DDDD"), "Weekday Number", WEEKDAY(BaseDate, 2) ) )
Joydeep Deb is a Senior Digital Marketer and Project Manager with strong experience in Digital Marketing, Lead Generation, Online Brand Management, Marketing Campaigns, Project Management, Search Engine Optimization (SEO), Search Engine Marketing (SEM), PPC, eMail Marketing, Web Analytics, Web Technologies, Web Design and Development.
With an MBA in Marketing. IIM Calcutta Alumini. Lives in Bangalore, Karnataka - India.