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
schwinnen
Helper V
Helper V

Previous Week for Week Ending on Sunday

Currently, I have several weekly reports where the primary report is previous week.  To get previous week, I use week numbers.  I have a column called Week Relative to Current that is used for this. So if it is Week 45 and last week is 44, I set a filter for week relative to current = 1 and that gives me the previous week.

Now, I have a request to use Monday - Sunday as a week instead of Sunday - Saturday.  I can get the date to reflect Sunday as the last day of the week (i.e. week ends 11/3/19 instead of 11/2/19), but I am struggling with translating that to filter for previous week.  I am not sure how to get the current week to reflect ending on Sunday and even if I get that to work, I'm not sure I can translate that to week numbers to filter for previous week.

Any ideas on this would be appreciated.

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

WeekNum has a built in option for this.  If you select ',2' after the date in WeekNum it will use Monday's automatically.

 

Default WeekNum = WEEKNUM(Table1[Date],1)
WeekNum Option 2 = WEEKNUM(Table1[Date],2)
 
DateDefault WeekNumWeekNum Option 2
11/2/2019 0:004444
11/3/2019 0:004544
11/4/2019 0:004545
11/5/2019 0:004545
11/6/2019 0:004545
11/7/2019 0:004545
11/8/2019 0:004545
11/9/2019 0:004545
11/10/2019 0:004645
11/11/2019 0:004646



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

1 REPLY 1
fhill
Resident Rockstar
Resident Rockstar

WeekNum has a built in option for this.  If you select ',2' after the date in WeekNum it will use Monday's automatically.

 

Default WeekNum = WEEKNUM(Table1[Date],1)
WeekNum Option 2 = WEEKNUM(Table1[Date],2)
 
DateDefault WeekNumWeekNum Option 2
11/2/2019 0:004444
11/3/2019 0:004544
11/4/2019 0:004545
11/5/2019 0:004545
11/6/2019 0:004545
11/7/2019 0:004545
11/8/2019 0:004545
11/9/2019 0:004545
11/10/2019 0:004645
11/11/2019 0:004646



Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




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.