Forum

Custom Query / Add ...
 
Notifications
Clear all

Custom Query / Add dates to today, with multiple and statements

2 Posts
2 Users
0 Reactions
74 Views
(@patri0t82)
Posts: 43
Trusted Member
Topic starter
 

Hello,

I also posted this at Technet and will remove if necessary:

https://social.technet.microsoft.com/Forums/en-US/c07cd673-b9cb-4d24-a059-89a9d32d137d/custom-query-add-dates-to-today-with-multiple-and-statements?forum=powerquery

 

I'm trying to write a query, but it's only returning errors:

if [#"Incident Date "] < Date.AddDays(Date.From(DateTime.LocalNow()),2) and [#"Incident Status "] = "Step 2 - Detailed Report" then "Overdue" 

else 

if [#"Incident Date "] < Date.AddDays(Date.From(DateTime.LocalNow()),5) and [#"Incident Status "] = "Step 3 - Detailed Report/Normal Sign-Off" then "Overdue" 

else 

if [#"[Target Completion Date]"] < Date.From(DateTime.LocalNow()) and [#"Incident Status "] = "Step 4 - Investigation" then "Overdue" 

else 

if [#"[Target Completion Date]"] < Date.From(DateTime.LocalNow()) and [#"Incident Status "] = "Step 5 - Investigation Sign Off" then "Overdue" 

else

null

 
Posted : 18/12/2018 11:20 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Adam,

There isn't enough information for us to troubleshoot, but it looks like you're already going through the process of filling in the blanks on Technet, so not much more we can help with at this stage.

If you don't get it resolved then please come back.

Mynda

 
Posted : 18/12/2018 10:13 pm
Share: