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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Gantt Chart, focus on subset of dates

Hi!

 

My question is regarding the use of the 'Gantt' visual (Gantt 1.14.3.0).

 

I was wondering if there is a way to focus on a subset of all the dates. I would like to be able to focus on the dates between something like this: TODAY - 7 days and TODAY + 90 days. It kind of feels like functionallity that could be regularly needed so I am hoping someone has a solution. My reason for this is because my dataset contains projects spanning for many years, while only the a few months is relevant for closer inspection.

 

I can't find a solution as the the data is periodical with a Start and an End date and not reported daily.

 

Has anyone done something similar or has the logic to solve this one? :slightly_smiling_face:

 

Best regards

arefossa

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a CALENDAR table as below.

 

Table = CALENDARAUTO()

Here we needn't create relationship between the fact table and the date table. After that, create a measure as below and make the visual filtered by it.

 

Measure = var mindate = MIN('Table'[Date])
var maxdate = MAX('Table'[Date])
return
IF(MAX(Gantt[StartDate])>=mindate && MAX(Gantt[FinishDate])<=maxdate ,1,0)

 

fin.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a CALENDAR table as below.

 

Table = CALENDARAUTO()

Here we needn't create relationship between the fact table and the date table. After that, create a measure as below and make the visual filtered by it.

 

Measure = var mindate = MIN('Table'[Date])
var maxdate = MAX('Table'[Date])
return
IF(MAX(Gantt[StartDate])>=mindate && MAX(Gantt[FinishDate])<=maxdate ,1,0)

 

fin.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please share your sample data and excepted result to me if you don't have any Confidential Information.Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors