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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
drgrd13
Helper I
Helper I

Slicer in Gantt Chart Timeline

Hi

 

I am building a production dashboard in Power bi using Gantt Chart (by Microsoft Corporation). 

 

In this dashboard, I am not able to filter the timeline based on dates showing only on weekdays and also user wants to view the timeline in hours based on working hours from 8 am to 5 pm. 

 

Can someone help me with the filter on the Gantt Chart? 

 

 

drgrd13_0-1687718010855.png

 

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @drgrd13 ,

To filter the timeline based on weekdays, you can create a calculated column in your data model that returns a 1 for weekdays and a 0 for weekends. Then, you can use that column as a filter in your Gantt chart.

IsWeekday = IF(WEEKDAY([Date],2) <= 5, 1, 0)

To display the timeline in hours based on working hours from 8 am to 5 pm, you can adjust the axis settings in your Gantt chart. In the Format pane, under the Axis section, you can set the minimum and maximum values for the axis to 8:00 AM and 5:00 PM respectively. You can also set the interval to 1 hour.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Thanks for your help. 

 

Unfortunately, this solution does not work well with the data. My aim is to filter out weekend dates from the Timeline in Gantt chart 2.2.3. Also, I am not sure which axis we have to use in the Gantt chart where we can filter the timeline. I have attached my power bi sample report.  

https://drive.google.com/file/d/1UuNaeMzNxB7kR02o6FOAbhc8-yiloTmD/view?usp=sharing

 

My main aim is to not to include out-of-working hours and weekends on the timeline. 

drgrd13_0-1687857348613.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.