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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
sujaynadkarni
Frequent Visitor

Vlookup equivalent in Powerbi

Hello Folks -

 

This is going to be a long message but I want to be sure I explain the data model, objective and problem well.

 

I have two tables: Subject that has Subject ID, Name and User Id.  Second Table contains: User id and Name:

 

Subject Table

Subject IdLabelUser id
1HistoryA
1HistoryB
2GeographyA
2GeographyB
3MathC
3MathD

 

User

User IdName
AJoe
BJane
CJohn
DJim

 

I have two objectives - one is to find students enrolled in History, which I was able to do.  Second objective is to identify students NOT enrolled in History. If I filter Label is not "History", I will get User id A aka Joe.  But, as you can see Joe was enrolled in History.  I am sure there is a smarter way to do this but I did the following:

 

Added a conditional column on Subject Table with condition: If History, populate 1 or populate 2.  I then sorted the new column in ascending order.  

 

I then want to do add a column on the User object that is equivalent of a vlook up from Subject table.  Because vlook up finds the first value and the subject table was sorted, I should get 1 or 2 (enrolled in history or not).  When I try to use related function, I do not see "Subject" table.  Is it because "Subject" is on the many side of the relationship and how can I resolve this?

 

 

1 ACCEPTED SOLUTION
sujaynadkarni
Frequent Visitor

Ok.  I was able to resolve this using Minx and related table 🙂

View solution in original post

1 REPLY 1
sujaynadkarni
Frequent Visitor

Ok.  I was able to resolve this using Minx and related table 🙂

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors