Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.
For the week slicer:
My calendar table has a series of columns for weeks: [W] for weeks number, [week start date] self explainatory, [week finish date] same as previous but for ending date. I created another column:
Week filter=if (and('date'[W]=weeknum(today(),2), 'date' [year]=year(today())), "Current Week", 'date'[week start date]&"-"&'date'[week finish date]).
Gantt Visual
What I want to see here is all the ships that are schedulled for the selected week and 3 weeks from that, so let's say I select current week on my slicer, I want to see all the shipments from this weeks start up and till 21 days after.
Approach
I have no idea how to solve this 😞
Solved! Go to Solution.
I finally solved it. For anyone who somehow finds this forum entry and is looking for a similar approach: I created a separate date table identical to the first one i had, but i didn't link it to any other table. I then use the week column on my date table for the slicer. Then i created a measure as follows:
3 weeks forward check=
var weekstartselected= selectedvalue(dateslicer[week start date]) //this is the week start date for the selected week in the week slicer
var days forward= weekstartselected+21
var result=
if(minx(orderstable, datevalue(orderstable[startshippingdate]))>=datevalue(weekstartselected)&&minx(orderstable, datevalue(orderstable[startshippingdate))<=datevalue(daysforward),1 ,0)
return
result
I then added that measure as a filter to the visual and set so that it's equal to 1. 🙂 it finally worked
I finally solved it. For anyone who somehow finds this forum entry and is looking for a similar approach: I created a separate date table identical to the first one i had, but i didn't link it to any other table. I then use the week column on my date table for the slicer. Then i created a measure as follows:
3 weeks forward check=
var weekstartselected= selectedvalue(dateslicer[week start date]) //this is the week start date for the selected week in the week slicer
var days forward= weekstartselected+21
var result=
if(minx(orderstable, datevalue(orderstable[startshippingdate]))>=datevalue(weekstartselected)&&minx(orderstable, datevalue(orderstable[startshippingdate))<=datevalue(daysforward),1 ,0)
return
result
I then added that measure as a filter to the visual and set so that it's equal to 1. 🙂 it finally worked
@fugazzetta I've done something similar before. Here was my approach. The code for my date table looked like this
Date =
ADDCOLUMNS (
CALENDAR (MIN(Table[date]), MAX(Table[date])),
"Weeks from Today", DATEDIFF(TODAY(), [Date], WEEK)
)
A couple of notes: be sure your date table is marked as a date table; you need a relationship between the date table date and Table[date]; and both fields need to be of type date.
Once you have this, you can create a slicer on Weeks from Today. Use the down-arrow (upper right of the slicer) to pick "Between" and you'll get a min/max along with a slider like this
If you truly want to show only three weeks into the future from a selected date, you could write a measure involving selected date and Weeks from Today.
Thanks for your repply! I did something similar to that already, the problem is i want to be able to see ships 3 weeks from any selected week in the slicer. Some times my team needs to see shipments from a selected week up and till 3 weeks later, that way they can plan everything needed in the future. So I still need a way to somehow filter the ships that are schedulled three weeks from any week selected in the licer. Any Idea on how to solve this?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.