Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Create new conditional column

Hello, can someone please help me with DAX? I want to create a fourth column called "Satatus" where I indicate if the "ID", "Year", "activity" had the same activity. Then the result in the new colum...
  • ryan_mayu's avatar
    ryan_mayu
    3 years ago

    you can try this

    Column = 
    VAR _a=maxx(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Year]<>EARLIER('Table'[Year])&&'Table'[Activity]=EARLIER('Table'[Activity])),'Table'[Activity])
    return if('Table'[Activity]="","Ninguna",if(_a="","Cambiaron","Misma"))

    pls see the attachment below

  • Syndicate_Admin's avatar
    Syndicate_Admin
    3 years ago

    @ryan_mayu thank you very much for your support, I work percfecto!!

    Greetings and blessings. Rosary.