Forum Discussion
Date Table
Hello,
Anyone assist please,
I have created a Date Table and Marked it as a Date Table using CALENDARAUTO as screened below
Calendarauto =
VAR MinYr = YEAR(MIN(FactTablefile[Quarter_startdate]))
VAR MaxYr = YEAR(MAX(FactTablefile[Quarter_startdate]))
Return
FILTER(
CALENDARAUTO(9),
MinYr &&
MaxYr
)
Unfortunately, the date table generated picked only one year (Oct 2021 - Sept 2022) from the fact table while the referenced date column (Quarter start date) from fact table having dates starting from January 2020.
tmhalila , My advice would be to try like
Calendar
VAR MinYr = YEAR(MIN(FactTablefile[Quarter_startdate]))
VAR MaxYr = YEAR(MAX(FactTablefile[Quarter_startdate]))
Return
calendar(date(MinYr,1,1), date(MaxYr,12,31))
2 Replies
- amitchandak
Super User
tmhalila , My advice would be to try like
Calendar
VAR MinYr = YEAR(MIN(FactTablefile[Quarter_startdate]))
VAR MaxYr = YEAR(MAX(FactTablefile[Quarter_startdate]))
Return
calendar(date(MinYr,1,1), date(MaxYr,12,31))- tmhalila
Resolver II
Thank you amitchandak
I am glad to be part of this community, you saved my day👏👏👏. Stay blessed!