Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
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 column "Status" would say: Same, Changed, None
Thanks a lot!! Rosario Pineda.
| ID | Year | Activity |
| 1 | 2019 | Yoga |
| 1 | 2019 | Dance |
| 1 | 2019 | Pilates |
| 1 | 2019 | Swimming |
| 1 | 2020 | Dance |
| 1 | 2020 | Pilates |
| 1 | 2020 | Swimming |
| 1 | 2020 | Meditation |
| 2 | 2019 | Yoga |
| 2 | 2019 | Dance |
| 2 | 2019 | Pilates |
| 2 | 2019 | Swimming |
| 2 | 2020 | Yoga |
| 2 | 2020 | Dance |
| 2 | 2020 | Pilates |
| 2 | 2020 | Swimming |
| 3 | 2019 | Yoga |
| 3 | 2019 | Dance |
| 3 | 2019 | Pilates |
| 3 | 2019 | Swimming |
| 3 | 2020 | Yoga |
| 3 | 2020 | Dance |
| 3 | 2020 | |
| 3 | 2020 | Swimming |
Solved! Go to Solution.
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
Proud to be a Super User!
@ryan_mayu thank you very much for your support, I work percfecto!!
Greetings and blessings. Rosary.
Not sure this is what you mean, but please try this column expression. Replace Activities with your actual table name.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
i can't find id year and activity has the same value.
could you pls add the expected output in the sample data you provided?
Proud to be a Super User!
Sorry I didn't understand your question, I rewuiero new column as the example below:
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
Proud to be a Super User!
@ryan_mayu thank you very much for your support, I work percfecto!!
Greetings and blessings. Rosary.
you are welcome
Proud to be a Super User!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 60 | |
| 52 | |
| 47 | |
| 40 | |
| 38 |