Forum Discussion
spandy34
Responsive Resident
2 years agoConditional column dates multiple criteria
Hi I would like to create a Conditional Column called Status in Power Query and wondered if someone could help with the code for the following please as I am unsure of how to do it: ...
- 2 years ago
Thats great and worked thank you for helping me.
vicky_
Super User
2 years ago= Table.AddColumn(#"Changed Type", "Custom", each if ([#"Milestone/Description"] = "Not Started" or [#"Milestone/Description"] = "") and Date.IsInPreviousNWeeks([Due Date], 4) then "Amber" else if [Due Date] > DateTime.Date(DateTime.LocalNow()) and ([#"Milestone/Description"] = "Not Started" or [#"Milestone/Description"] = "" or [#"Milestone/Description"] = "In Progress" or [#"Milestone/Description"] = "Complete") then "Green" else if ([#"Milestone/Description"] = "Not Started" or [#"Milestone/Description"] = "") and [Due Date] < DateTime.Date(DateTime.LocalNow()) then "Red" else "???")
Try something like the above?
spandy34
Responsive Resident
2 years agoThats great and worked thank you for helping me.