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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
matthewfe
Regular Visitor

Gantt chart Slicer Functionality

Hello,

 

I am attempting to create a Gantt chart to show the flow of projects happening over the course of two years. My excel document I am pulling from currently has the following columns:

1) Project Name

2) Region

3) Stage Start (for project)

4) Stage End (for project)

5) Employees

6) Employee's time % allocated to project

7-XXX) And from here I have listed every week from 1/1/2017 to 12/31/2018

 

The problem not creating a Gantt chart. I have created that with no problems. But I want to be able to use a slicer to select a date range and then ANY project that is active during that range shows up on the Gantt chart. It is not very helpful to have a 'Stage Start' and 'Stage End' slicer. I would much rather have one slicer, 'Date Range', and proceed from there.

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @matthewfe,

 

Please create a calendar table. Drag [date] from this calendar table to date range slicer.

dim = CALENDAR(DATE(2017,1,1),DATE(2018,12,31))

Then, create a measure with below DAX. Add this Flag measure into visual level filter of Gantt chart and set its value to 1.

Flag =
IF (
    SELECTEDVALUE ( Project_tab[Stage Start] ) >= MIN ( dim[Date] )
        && SELECTEDVALUE ( Project_tab[Stage End] ) <= MAX ( dim[Date] ),
    1,
    0
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This did not solve my issue. There is a chance I did not properly explain what I needed.

 

What you did make sense but I will explain the result. There is a certain project, project X, I used to test the slicer.

 

The start date is 6/11/2018 and the end date is 6/24/2018. I set the slicer end date to 6/1/2018 and the start date remained at 1/1/2017. The desired result would be that project X is taken out of the gantt chart. This was not the case. It made no affect on the chart whatsoever.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors