title: DAX modification to fix the timeline on the Gantt Chart [Power BI - Matrix Visual]
body: <p>I am not sure how to resolve the Gantt Chart Timeline. I have used the code as below to create a timeline on matrix visual.</p>
  <pre><code>End of Month Date = 
  EOMONTH(TODAY(), -'DATE'[Value])
  </code></pre>
  <p>If the <strong>NBA-UC-04</strong> is selected on the slicer, the timeline start should be from Apr-22 onwards &amp; not Jan-22 as shown below in red.</p>
  <p><a href="https://i.stack.imgur.com/UyKFC.png" rel="nofollow noreferrer">Start Timeline</a></p>
  <p>Similarly, if the <strong>NBA-UC-04</strong> is selected on the slicer, the timeline end should be upto Aug'22 &amp; future months to be hidden from the timeline as shown below in red.</p>
  <p><a href="https://i.stack.imgur.com/ocTdA.png" rel="nofollow noreferrer">End Timeline</a></p>
  <p>The same logic as below</p>
  <p>Timeline Start Month = Date.Min[Start]</p>
  <p>Timeline End Month = Date.Min[Finish]</p>
  <p>should work when NBA-BL-00 or other selection is made on the slicer.</p>