Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BartoszS
New Member

Lookup two conditions in another table and return TRUE or FALSE

Hi,

I have two tables structured like this:

Table 1

User IDUsernamePermissions
A1234User1Permission1
A1234User1Permission2
A2364User2Permission1

 

Table2

User IDUsername
A1234User1
A2364User2

 

I want to add column to Table2 that will return TRUE if the UserID and Permission1 exist for this User ID in Table1. False if they don't.

I have managed to use Excel function (IF and XLOOKUP) to get this information I need but because of the size of the data and formula complexity it takes days to run the functions (and they crash).

 

Is it possible to do it in Power BI DAX or in Power Query?

Thank you,

Bartosz

1 REPLY 1
amitchandak
Super User
Super User

@BartoszS ,

 

a new column in table 2

=

var _cnt = countx(filter(Table1, Table2[USerid] = Table1[UserID]  && not(isblank(Table1[Permission]))  ), Table1[UserID] )

return

if(isblank(_cnt), false() , true() )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors