Forum Discussion

drgrd13's avatar
drgrd13
Icon for Helper I rankHelper I
3 years ago

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? 

 

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

     

    • drgrd13's avatar
      drgrd13
      Icon for Helper I rankHelper I

      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.