Forum Discussion

AzJackson's avatar
AzJackson
New Member
3 years ago
Solved

Caluate days between days witha including a today variable

Hello,   Need help with a formula for a measure please. My data has two date columns, Start Date, Closed Date. The start date allways has a date in it The closed date will not have a date in it ...
  • parry2k's avatar
    3 years ago

    AzJackson add a new column using the following logic

     

    Number of Days = DATEDIFF ( Table[Start Date], COALEASCE ( Table[End Date], TODAY () ), DAY )

     

    Follow us on LinkedIn and  to our YouTube channel

    I would ❤ Kudos if my solution helped. If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

  • Anonymous's avatar
    Anonymous
    3 years ago

    DATEDIFF([Start Date],IF(ISBLANK(Closed Date) = TRUE(),NOW(),[Closed Date]),DAY)

     

    Try this.

     

    It's saying "Get the date difference in days between start date and closed date, if the closed date is blank, use today's date".

    Let me know if this works. Kind regards.