Hi there!
I need some help creating a valid formula for billing. This formula I’m posting is ugly and insane, and it’s a non-workable rough idea of what I’m needing. I’m hoping I can start a conversation to help me identify ways to either make extra columns in airtable, or identify whether this formula could actually work, or if I’m crazy for trying to make it this complicated. Here goes lol…
IF({LAST BILLING DAY}>{Date Received}>{FIRST BILLING DAY}
AND {Pull Date}>"!=blank()"
AND {LAST BILLING DAY}>{Pull Date}>{FIRST BILLING DAY},
DATETIME_DIFF({Pull Date},{Date Received},‘days’),
IF({FIRST BILLING DAY}>{Date Received}
AND {Pull Dates}=blank(),
DATETIME_DIFF({LAST BILLING DAY},{FIRST BILLING DAY},‘days’),
IF({FIRST BILLING DAY}>{Date Received}
AND {Pull Dates}> “!=blank()”,
DATETIME_DIFF({Pull Dates},{FIRST BILLING DAY},‘days’),
DATETIME_DIFF({LAST BILLING DAY},{Pull Dates},‘days’))))
To explain a little, a “pull date” is when it’s delivered.
I’m wanting to create a simple formula so that the output is simply the number of days the product was in the warehouse for the month, I would only adjust the FIRST BILLING DATE and LAST BILLING DATE each month. Thanks for anyone that would want to attempt this!
UPDATE:
I found a formula that works for all items that haven’t been delivered yet:
IF(AND({LAST BILLING DAY}>{Date Received},{Date Received}>{FIRST BILLING DAY},{Pull Date}=0), DATETIME_DIFF({LAST BILLING DAY},{Date Received},‘days’),“error”)
But I needed to have another column to identify the delivered items:
IF({NOT DLVD BILLING}=“error”, DATETIME_DIFF({Pull Date},{Date Received},‘days’),BLANK())
But this second formula I need to change it so it accounts for items that are received or delivered “outside” of the billing month. Thanks again!