Calculating Time Between Dates in Organization Profile

Answered

3 Comments

  • Official comment
    Taylor Bowser
    Comment actions Permalink

    Hey Travis! 


    Thanks for reaching out in the Community! I was able to adjust this formula slightly and successfully capture the number of days between the Go Live Date and Churn Date using a standard calculated metric. Give this formula a try: 

    IF (([Go Live Date - Date] != NULL) AND ([Churn Date - Date] != NULL))
    THEN
    DATE_DIFF([Churn Date - Date],[Go Live Date - Date],"nb_of_days")
    ELSE
    DATE_DIFF(TODAY(),[Go Live Date - Date],"nb_of_days")
    ENDIF

     

    Hope this helps! 

  • Travis Tubbs
    Comment actions Permalink

    A bit of a late response on my part but I have to say adding the above still gave me query errors when adding as a custom metric attribute.

    But for some reason, when I deleted my custom attribute and added the above as a new custom attribute, it worked!

    So, yeah. Let's go with that! Thanks, Taylor!

    0
  • Travis Tubbs
    Comment actions Permalink

    Quick little note on my response above. Turns out I don't receive any errors if I add the Go Live Date and Churn Date as attributes along with the custom Total days live attribute. I'm confused as to why I would need to add to make this work properly but it works, so sure. Why not.

    0

Please sign in to leave a comment.

Powered by Zendesk