Forum Discussion

steambucky's avatar
steambucky
Icon for Helper III rankHelper III
8 years ago

Meauring time and months AND if statements.

Hello :)

 

This measure I wrote helps work out the data’s age in months

 

_Months_of_age = DATEDIFF(MAX(SIR_XLS[Rev_Date]),TODAY(),MONTH)

 

What I would like is something that, where there IS a date, returns the age in months, and if there is NO DATE, to say,

 

“No date supplied”

 

Any ideas how would I write this? Is this an IF statement sort of thing?

 

Thanks in advance for any help or pointers you can give.

 

 

1 Reply

  • Is this heading in the right direction?

     

    _Months since reviewed FIX =
    IF (
        (SIR_XLS[Rev_Date])=blank,
        "NO DATE",
     DATEDIFF(MAX(SIR_XLS[Rev_Date]),TODAY(),MONTH)
    )

     

    Its still not working though...