Days between x and today
Attempting to create a formula that shows how long our requisition has been opened. I attempted with DDiff(requisition created date, todays date) but formula is unsuccessful.
hlister
Posted 1 year ago·Last reply 1 year ago
3 comments
DRay
·1 year agoHello hlister,
I’m following up to see if the solution offered by david-h worked for you.
If so, please click the 'Accept as Solution' button on their post. That way others with the same questions can find the answer. If not, please let us know so that we can continue to help.
Thank you.
david-h
·1 year agoHi hlister ,
You are probably attempting to do it in the dashboard, and the error is likely to be "The DDIFF function must be wrapped" in an aggregation function.
The DDIFF function is not an aggregation, so it calculates the time difference on each row of the underlying response of the generated query. As a result, to be valid, you must indicate an aggregation. So if you are to write something like "DDIFF(Requisition_Create , Now())" you can use MIN, MAX or AVG with the same result if your dimension is the requisition id.
If you are using a more aggregative dimension, like team id, country, site or something like that, you can use MAX to have the longest time span, or MIN to have the most recent requisition.
Let me know if this helps.
Best, David.
Michalis Gregoriou
·1 year agoHi hlister
Would you mind sharing a few more details regarding the formula you are trying to create?
Are you trying to create it in the model or in the dashboard?
Is the "created date" a Date-Time format?
Feel free to share screenshots!