Hi there - likely easy one here - I am trying to create a calculated field to count outstanding unpaid invoices that are either before their due dates or within 14 days of their due dates. When an invoice is unpaid, the "type" field is empty (i.e. no payment type.) I've also created a custom calculated column with the payment due date minus the current date. Each invoice has a unique invoice ID so I am essentially trying to count those. This is the count/case statement I have currently but I am not sure if a null value is working here.
Any thoughts?
count(case when `type`=NULL and when `Due Date MINUS Current Date`>=-14 then `invoice_id` else 0 end)