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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
fugazzetta
Frequent Visitor

I really need help, how to show dates between week selected and 3 weeks from the start of that week?

So basically my model is conformed by two tables, one has orders data and the other is a calendar table. Basically what I want to do is show the shipments that are happening between a selected week and 3 weeks forward from that selected week (via slicer). For this I have a gantt visual which has a shipping start date and end date, and as tasks i'm showing the names of the ships. Both tables are conected via the shipping start date and date in calendar table.

I have a slicer in which i can select weeks, and calendar table also has a column with the starting date of each week, so if i select the week for 10/17/20 - 24/10/22 the starting date for that week would be 17/10/20. What i want to be able to do is display the names of the ships that are shipping between the starting date of the selected week (via a slicer witht he weeks column) and 21 days after the start of the selected week. To do this I am using a gantt visual with the ships as tasks, but i can't figure out how to set a measure that gives me all the starting dates between a selected week and 21 days forward. 

1 ACCEPTED SOLUTION

I just posted a solution here, the first post i made on this topic but i thought it wasn't clear so  I made a new one rephrasing the original post. My solution is pretty similar to yours 🙂 https://community.powerbi.com/t5/Desktop/I-really-need-help-how-to-show-dates-between-week-selected-...

View solution in original post

2 REPLIES 2
grantsamborn
Solution Sage
Solution Sage

Does your date table contain a "Week Start Date" column?  If so...

 

For this solution you need a disconnected date table for the slicer.

 

 

Next 3 Weeks = 
VAR _Start = MAX('Date'[Start of Week])
VAR _End = _Start + 21
VAR _Ship = MAX('Shipments'[Start Date])
RETURN
    IF( _Ship >= _Start && _Ship <= _End, "Display", BLANK())

 

 

I just posted a solution here, the first post i made on this topic but i thought it wasn't clear so  I made a new one rephrasing the original post. My solution is pretty similar to yours 🙂 https://community.powerbi.com/t5/Desktop/I-really-need-help-how-to-show-dates-between-week-selected-...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors