I got the original from C# Corner but I modified it. This is what I'm working with and the bar is not starting where it should nor does the width have the correct value.
Label Name: Bar
X = Value((StartDays_1.Text) * 'Gantt Tasks_2'.Width/365) The starting date is not correct on the gantt chart.
Width = (Value(EndDays_1.Text) - Value(StartDays_1.Text)) * 'Gantt Tasks_2'.Width / 365 This calculates correctly.
Tasks is the Gallery Name
StartDays_1 is a Text Input field
Default = DateDiff(Date(2026,1,1), DateValue(Text(StartDate_1.Text, "[$-en-US]mm/dd/yyyy"))) This calculates correctly.
EndDays_1 is a Text Input field
Default = DateDiff(Date(2026,1,1), DateValue(EndDate_1.Text))+1 This calculates correctly.
StartDate_1 is a Text Input field
Default = ThisItem.StartDate
Column name is StartDate
EndDate_1 is a Text Input field
Default = ThisItem.EndDate
Column name is EndDate
Here is my Tree View 