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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Week Slicer Difference

Good day, guys.

 

I have sample data about audits of fuel products, among the data being captured is the completion date (when a laserfiche form is submitted online), and a computed database field, weekstartdate, which is always on a Tuesday. The following are available audit data in May:

 

Completion date / weekstartdate

2022-05-11 14:51:00 / 2022-05-10 00:00:00.000
2022-05-11 11:42:00 / 2022-05-10 00:00:00.000
2022-05-05 07:32:00 / 2022-05-03 00:00:00.000

 

When I use date slicers, Last week, Next week, and This week, they each displays different data, as follows:

 

Last week: May 5 - May 11

Last weekLast week

This week: May 8 - May 14

This weekThis week

 

Next week: May 11 - May 17

Next weekNext week

 

I wonder why the audit data on 2022-05-11 14:51:00 was only displayed on Next week filter, and not Last week and This week?

 

Thanks for the help.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,It is rolling week, You can see date 11 is included , Choose calendar week

 

In your calendar, you can week start as tuesday. But you will not be able to set that slicer based on the week start on Tuesday .

 

In you calendar you need to create a week rank on week start date and then calculate this week vs last and next week

Column

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)

 

measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))

 

Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

 

next Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])+1))

 

You need your own slicer for this week, last week etc

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,It is rolling week, You can see date 11 is included , Choose calendar week

 

In your calendar, you can week start as tuesday. But you will not be able to set that slicer based on the week start on Tuesday .

 

In you calendar you need to create a week rank on week start date and then calculate this week vs last and next week

Column

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)

 

measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))

 

Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

 

next Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])+1))

 

You need your own slicer for this week, last week etc

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks very much for this @amitchandak 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.