Forum Discussion
Help Applying Calendar Functions
I am currently using a date table in Power BI that is built as follows:
Date =
ADDCOLUMNS (
CALENDAR (DATE(2000,1,1), DATE(2025,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthYear", FORMAT ([Date], "mmm-yyyy"),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)
This has served me well in the ability to represent calendar based performance. That said, I am looking for someone who can help me define Week Number as part of this representation.
Additionally, because my business has a very particular calendar I am looking for some guidance on how I can build or leverage a "custom calendar" to anaylyze business results. For instance 1/1/2017 fell on a Monday, while 1/1/2016 was on a Friday. Clearly, in 2017 the first week of 2017 allowed more business days than 2016. How can I compare performance of Week 1 of each year given the variability in the calendar?
So here's my questions boiled down:
- Using the DAX statement above, how can I incorporate Week Number (based on standard/traditional) calendar?
- What is the best way to do WOW, MOM and YOY analysis?
- Can I create a custom calendar that allows me to normalize calendars given the busienss day variability in calendars?
Thanks for all the help.
1 Reply
- v-chuncz-msftCommunity Support