Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |