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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.