Forum Discussion

adoalan's avatar
adoalan
Helper III
3 years ago

Help with comparing two dates DAX

Hi,

 

Can you help me with the below formula.

I want to compare the two dates but is asking to use an agregation

 

New Existing = IF(nfp_giftaiddeclaration[Created On] <= EDATE('contact'[Created On],1),
    "New",
    "Existing"
)
 
Many thanks
ADO

9 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi adoalan 
    Is there a relationship between the two tables? Also please explain the logic behind this calculation.

    • adoalan's avatar
      adoalan
      Helper III

       

      Hi tamerj1 relationship in place.

       

      The logic is if Created on from gift table <=with Created on from contact table then "New",
      "Existing"

      • tamerj1's avatar
        tamerj1
        Community Champion

        adoalan 

        Ok but is the logic behind using EDATE? Also in which table would ou like to create this column?

  • hi adoalan 

    Do you want to add a calculated column?

    Are you really adding a calculated column