Forum Discussion
create custom column using one column as a list
- 4 years ago
Hello there Anonymous ! You can check if this works for you:
Leader of Leader = VAR _sub = SELECTEDVALUE ( [submitter email] ) VAR _list = DISTINCT ( [Manager email] ) RETURN IF ( _sub IN _list, TRUE (), FALSE () )Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
I have not shared previously so not sure what you are asking for exactly. below is a screen shot of the report. the two colums exist in the All Employees table. the Leader of leaders table was the blank table I created and put the code into. but the code only built my example table again.
i need it to build from the All employees table so when it is update the leader of leader table updates as well.
The code I gave you was just an example of the "how".
The steps that matter are...
list = #"Changed Type"[Manager email]
This turns the Manager email column into a list for searching.
And the...
Custom1 = Table.AddColumn(#"Changed Type", "custom", each List.Contains(list, [submitter email]))
This uses the 'list' to search the submitter email.
Columns and steps will need to be renamed to suit obviously.
If you're still having issues, if you copy the code from the 'Advanced editor' for the "All Employees" table and paste it here, I'll be able to name the steps better. (make sure to obfuscate any sensitive data)