May 16, 2024 11:09 AM
Hi all - I need help with this formula as I was able to use Chat GPT to get me close to where I need to be, but it still doesn't work.
Can someone rewrite this formula so it works:
IF({End Date} > "7/1/2024" , {Latest Revenue Projections} * ("6/30/2024"- {Start Date}+1) / ({End Date} - {Start Date}+1) , "")
May 16, 2024 01:07 PM
Hi! Can you explain what you are trying to do here?
May 16, 2024 04:30 PM
It looks like you are trying to calculate the number of days to determine the % of the quarter complete or something similar to that. In that case you need to use datetime_diff(start, end, 'days').
IF({End Date} > "7/1/2024" , {Latest Revenue Projections} * ("6/30/2024"- {Start Date}+1) / ({End Date} - {Start Date}+1) , "")
would look something like:
IF({End Date} > "7/1/2024" , {Latest Revenue Projections} * datetime_diff("6/30/2024", {Start Date}, 'days') / datetime_diff({End Date}, {Start Date}) , "")
Not sure what the +1 is doing since you didn't provide more detail around. But to address your question, you need to use datetime_diff to subtract one date from another date.