Forum Discussion
Anonymous
4 years agoNot applicable
Add Conditional column based on three dates
Hi All , I need some inputs regarding adding a new field "Status" . I have start date and End Date . The logic Is , if current date is between startdate and End date then the status is "Active" el...
- 4 years ago
Sorry, I have updated the script to use your table name.
Table.AddColumn(tablename, "Status", each let today = Date.From ( DateTime.FixedLocalNow() ) in if [Start_Date] <= today and [End_Date] >= today then "Active" else "Inactive", type text)
jennratten
4 years agoSuper User
Sorry, I have updated the script to use your table name.
Table.AddColumn(tablename, "Status", each let today = Date.From ( DateTime.FixedLocalNow() ) in if [Start_Date] <= today and [End_Date] >= today then "Active" else "Inactive", type text)