Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table with two columns Submitter email and Manager email. How would I create a custom column which will display TRUE if the submitter email is found anywhere in the Manager email.
as shown below. The submitter email could be anywhere in the Manager email or not at all.
submitter email | Manager email | Leader of Leader |
email 1 | email 8 | TRUE |
email 2 | email 9 | TRUE |
email 3 | email 1 | FALSE |
email 4 | email 2 | FALSE |
Solved! Go to Solution.
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
hi
you can also create a calculated column
In Power Query (Transform data) paste the below code into the 'Advanced Editor' of a blank query.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"i45WSs1NzMxRMFTSgbIslGJ1YKJGcFFLJFFjBbiwIZKwCVzUSCk2FgA=",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [#"submitter email" = _t, #"Manager email" = _t]
),
#"Changed Type" = Table.TransformColumnTypes(
Source,
{{"submitter email", type text}, {"Manager email", type text}}
),
list = #"Changed Type"[Manager email],
Custom1 = Table.AddColumn(#"Changed Type", "custom", each List.Contains(list, [submitter email]))
in
Custom1
Hope this helps.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
I feel like I am missing something here. Like identifying the table I am pulling the new columns from.
so how do I make this happen from an existing table in my report.
For me the data is in the All Employee Table
Can you show me the structure of the table in your report (without any sensitive data)?
And paste your existing Power Query code for that query?
I don't quite follow what you mean.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
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)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.