gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I have two date fields the first is when a Task is Due and the second is when it was completed. I need a formula to show if the task was completed "On Time", "Completed Late", "Past Due" or "In Process"
(note I need to check to see if the field is Null or not. If either is Null then "Null"
Where I am unsure is incorporating todays date into the formula.
[K_PDIR Due Date]
[L_PDIR Completed]
I know these do not have the correct syntax - but I hope it helps explain what I need.
if [K_PDIR Due Date] = null or [L_PDIR Completed]= null then null
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]< or = [K_PDIR Due Date] then "On Time"
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]> [K_PDIR Due Date] then "Completed Late"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] > or =Now() "In Process"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] < or =Now() "Past Due"
Thank you for your help. New to Power Query
(note I need to check to see if the field is Null or not. If either is Null then "Null"
Where I am unsure is incorporating todays date into the formula.
[K_PDIR Due Date]
[L_PDIR Completed]
I know these do not have the correct syntax - but I hope it helps explain what I need.
if [K_PDIR Due Date] = null or [L_PDIR Completed]= null then null
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]< or = [K_PDIR Due Date] then "On Time"
if [K_PDIR Due Date] = not null or [L_PDIR Completed] and [L_PDIR Completed]> [K_PDIR Due Date] then "Completed Late"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] > or =Now() "In Process"
if [K_PDIR Due Date] = not null and [L_PDIR Completed] =null and [K_PDIR Due Date] < or =Now() "Past Due"
Thank you for your help. New to Power Query