table LocalDateTable_FILE_ID
	isHidden
	showAsVariationsOnly
	lineageTag: TABLE_ID

	column Date
		dataType: dateTime
		isHidden
		formatString: General Date
		lineageTag: COL_ID
		dataCategory: PaddedDateTableDates
		summarizeBy: none
		isNameInferred
		sourceColumn: [Date]

		annotation SummarizationSetBy = User

	column Year = YEAR([Date])
		dataType: int64
		isHidden
		formatString: 0
		lineageTag: COL_ID
		dataCategory: Years
		summarizeBy: none

		annotation SummarizationSetBy = User

		annotation TemplateId = Year

	column MonthNo = MONTH([Date])
		dataType: int64
		isHidden
		formatString: 0
		lineageTag: COL_ID
		dataCategory: MonthOfYear
		summarizeBy: none

		annotation SummarizationSetBy = User

		annotation TemplateId = MonthNumber

	column Month = FORMAT([Date], "MMMM")
		dataType: string
		isHidden
		lineageTag: COL_ID
		dataCategory: Months
		summarizeBy: none
		sortByColumn: MonthNo

		annotation SummarizationSetBy = User

		annotation TemplateId = Month

	column QuarterNo = INT(([MonthNo] + 2) / 3)
		dataType: int64
		isHidden
		formatString: 0
		lineageTag: COL_ID
		dataCategory: QuarterOfYear
		summarizeBy: none

		annotation SummarizationSetBy = User

		annotation TemplateId = QuarterNumber

	column Quarter = "Qtr " & [QuarterNo]
		dataType: string
		isHidden
		lineageTag: COL_ID
		dataCategory: Quarters
		summarizeBy: none
		sortByColumn: QuarterNo

		annotation SummarizationSetBy = User

		annotation TemplateId = Quarter

	column Day = DAY([Date])
		dataType: int64
		isHidden
		formatString: 0
		lineageTag: COL_ID
		dataCategory: DayOfMonth
		summarizeBy: none

		annotation SummarizationSetBy = User

		annotation TemplateId = Day

	hierarchy 'Date Hierarchy'
		lineageTag: COL_ID

		level Year
			lineageTag: COL_ID
			column: Year

		level Quarter
			lineageTag: COL_ID
			column: Quarter

		level Month
			lineageTag: COL_ID
			column: Month

		level Day
			lineageTag: COL_ID
			column: Day

		annotation TemplateId = DateHierarchy

	partition LocalDateTable_FILE_ID = calculated
		mode: import
		source = Calendar(Date(Year(MIN(DATA_SOURCE)), 1, 1), Date(Year(MAX(DATA_SOURCE)), 12, 31))

	annotation __PBI_LocalDateTable = true

