March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
This video perfectly taught what I wanted to do - https://www.youtube.com/watch?v=cOXNbaa_02U&ab_channel=Curbal
I'm hoping to add more factors into the each if statement. The issue I am facing is that 16 out of 20 people who are on international assignment are People managers and I need to classify them as such. But I don't have a format to deal with the 4 who are not. Since the list of people is small, my solution was to add another criteria into the each if statement but I'm a beginner so I'm unsure how to do so.
Would the best solution be:
1.if international assignment is yes
2. worker name is not (john, alex, abel, cain)
3. Then [Job role] = "People Manager"
4. Else [Job role]
= Table.AddColumn(#"Filtered Rows", "CJF Job Level Edited", each if [International Assignment] = "yes" then [Job Role] = "People Manager" else [Job Role])
Thank you!
Solved! Go to Solution.
Hi @Anonymous
Please try my M code in Power Query.
Custom column:
if [International Assignment] = "Yes" then
if List.Contains({"John","Alex","Abel","Cain"},[Name]) then "Not People Manager" else "People Manager" else "Not in International Assignment"
You see By this code, in my custom column, people with "Yes" and is not in four people will return "People Manager", people with "Yes" and is in four people will return "Not People Manager", and other people with "No" will return "Not in International Assignment".
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please try my M code in Power Query.
Custom column:
if [International Assignment] = "Yes" then
if List.Contains({"John","Alex","Abel","Cain"},[Name]) then "Not People Manager" else "People Manager" else "Not in International Assignment"
You see By this code, in my custom column, people with "Yes" and is not in four people will return "People Manager", people with "Yes" and is in four people will return "Not People Manager", and other people with "No" will return "Not in International Assignment".
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Ideally you should create another table with a single column of Names to be excluded and join that single column table into your main table. So rows where the names match in both tables will display as TRUE in a new column of your main table otherwise FALSE. Thereafter, write this Custom Column formula in the Query Editor
Table.AddColumn(#"Filtered Rows", "CJF Job Level Edited", each if [International Assignment] = "yes" then if [Match Name]=FALSE then [Job Role] = "People Manager" else "Don't know" else [Job Role])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |