Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
irnm8dn
Post Prodigy
Post Prodigy

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:

 

  1. Using the DAX statement above, how can I incorporate Week Number (based on standard/traditional) calendar?
  2. What is the best way to do WOW, MOM and YOY analysis?
  3. 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 1
v-chuncz-msft
Community Support
Community Support

@irnm8dn,

 

Take a close look at this article: Week-Based Time Intelligence in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.