Forum Discussion

swebb's avatar
swebb
Helper II
3 years ago
Solved

Issue with DATEDIFF

All,   PBI newbie here. Maybe I'm missing something, not real sure, but I have a measure that I'm using to calculate the average age of an opportunity from our CRM data. It works when coupled with ...
  • tamerj1's avatar
    3 years ago

    Hi swebb 

    please try

    Avg Age =
    AVERAGEX (
    opportunity,
    DATEDIFF ( [createdon], COALESCE ( [actualclosedate], TODAY () ), DAY )
    )