Forum Discussion
CALENDARAUTO
- 2 years ago
AlineTCarvalho You can potentially use this fiscal calendar: DAX Custom 445 Calendar - Microsoft Fabric Community
Otherwise, Melissa de Korte's Power Query function for creating calendar tables is probably a good bet. Extended Date Table Power Query M Function | Master Data Skills + AI (enterprisedna.co)
- 2 years ago
"Quarter", "Q" & QUARTER(EDATE([Date],3)))
- Anonymous2 years ago
Hi AlineTCarvalho ,
Thank lbendlin very much for his solution! But there is a small error, it should be "Quarter", "Q" & QUARTER(EDATE([Date],-3))). On that basis, I can give you a more complete date table, which can be seen in the following results:
DimDate = ADDCOLUMNS ( CALENDARAUTO (), "Year", YEAR ( [Date] ), "Month", FORMAT ( [Date], "MMMM" ), "MonthSort", MONTH ( [Date] ), "Day", DAY ( [Date] ), "DayName", FORMAT ( [Date], "DDDD" ), "WeekDay", WEEKDAY ( [Date],2 ), "WeekStart", [Date] - WEEKDAY ( [Date], 2 ) + 1, "Quarter", "Q" & QUARTER(EDATE([Date],-3)) )Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
"Quarter", "Q" & QUARTER(EDATE([Date],3)))
- AlineTCarvalho2 years agoNew Member
Hi Anonymous brilliant, easy way to fix it.
Thank you so much for your help!
this is how it turned out:Calendarauto Data =VAR MinYear = YEAR(MIN(fLedger[Posting Date]))VAR MaxYear = YEAR(MAX(fLedger[Posting Date]))RETURNADDCOLUMNS(FILTER(CALENDARAUTO(3),YEAR ([Date]) >= MinYear &&YEAR ([Date]) <= MaxYear),"Year", YEAR([Date]),"Quarter", QUARTER(EDATE([Date],-3)))