Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Everyone
I need to convert or know how to write the following DAX Add Column in M
Solved! Go to Solution.
Hi, @Simon_Evans
Thanks for the data, it always helps so much:
Add this as a new Custom Column:
let
dateofleaving = [DateofLeaving],
matchingTerm = Table.SelectRows(AcademicYears, each dateofleaving > _[Start Date] and _[Season] = "Autumn")
in
if not(Table.IsEmpty(matchingTerm)) then "Keep" else "Remove"
Please note, I had to adjust your custom data and I had to add type of Season so I was able to retrieve the needed information.
I attached the file, I worked with.
Hi, @Simon_Evans
Please share sample data for each table so I can play with the data and give you results. Thanks
Something like this for each table:
IdDateUserId
| 1 | 01.01.2022 | 2 |
| 2 | 27.01.2022 | 1 |
| 3 | 02.02.2022 | 2 |
| 4 | 20.03.2022 | 7 |
Hi @vojtechsima
Apologies for the delay. Please see the example I have put together below.
SessionAttendanceLeavers table example
| AttendanceCode | StudentID | DateofLeaving | Employee |
| A1329183376 | A92214024 | 23/07/2021 | null |
| A1161584171 | A92214024 | 23/07/2021 | null |
| A1161584171 | A352963710 | 10/10/2021 | null |
| A930902628 | A352963710 | 10/10/2021 | null |
| A1329183376 | A1840101401 | 1/1/2022 | null |
AcademicYears table
| Type | Start Date | End Date |
| Term | 01/09/2021 | 17/12/2021 |
| Term | 04/01/2022 | 01/04/2022 |
| Term | 19/04/2022 | 22/07/2022 |
Hi, @Simon_Evans
Thanks for the data, it always helps so much:
Add this as a new Custom Column:
let
dateofleaving = [DateofLeaving],
matchingTerm = Table.SelectRows(AcademicYears, each dateofleaving > _[Start Date] and _[Season] = "Autumn")
in
if not(Table.IsEmpty(matchingTerm)) then "Keep" else "Remove"
Please note, I had to adjust your custom data and I had to add type of Season so I was able to retrieve the needed information.
I attached the file, I worked with.
Thank you so much, that is perfect!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.