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.
Table 1- Name = ‘AADUsers’
UserPrincipalName | DisplayName |
User One | |
User Two | |
User Three | |
User Five |
Table 2 – Name = ‘InScope’
UserPrincipalName | DisplayName |
User One | |
User Five | |
User Ten |
I’d like to make a column on Table 1 (AADUsers) that is boulean Yes/No field if the ‘UserPrincipalName’ exists in table 2 (InScope)
Like this: -
Table 1 – ‘AADUsers’
UserPrincipalName | DisplayName | IsInScope |
User One | Yes | |
User Two | No | |
User Three | No | |
User Five | Yes |
Can anyone assist with the DAX expression for this?
Solved! Go to Solution.
HI, @davidtoyne
just adjust tablename and column name
try below for column code
Column =
var a = LOOKUPVALUE(U2[user name],U2[user name],U1[username])
RETURN
IF(a<>BLANK(),"yes","no")
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @davidtoyne
@Dangar332 gives a solution that you can try to use, and below there is a different solution you can refer to it as well
New Column:
IsInScope =
IF (
COUNTROWS (
FILTER ( InScope, InScope[UserPrincipal] = AADUsers[UserPrincipal] )
) > 0,
"Yes",
"No"
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @davidtoyne
@Dangar332 gives a solution that you can try to use, and below there is a different solution you can refer to it as well
New Column:
IsInScope =
IF (
COUNTROWS (
FILTER ( InScope, InScope[UserPrincipal] = AADUsers[UserPrincipal] )
) > 0,
"Yes",
"No"
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
HI, @davidtoyne
just adjust tablename and column name
try below for column code
Column =
var a = LOOKUPVALUE(U2[user name],U2[user name],U1[username])
RETURN
IF(a<>BLANK(),"yes","no")
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
12 | |
11 | |
8 | |
8 |
User | Count |
---|---|
24 | |
12 | |
12 | |
11 | |
10 |