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

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.

Reply
Anonymous
Not applicable

Creating calculated columns based on occurrences in another table

Hey Community,

 

You guys have been amazing support on my journey with Power BI till now. Special shoutout to @amitchandak for promptly solving these queries.

I have another question for you guys, Table1 has ID as primary key, table 2 has repeated value of ID and has a score attached to it, what i want to achieve is, i want to create a calculated column in table 1 that says "Rated" if ID appears in Table 2, and returns "Not-Rated" if iD doesn't appear in Table 2. I'm attaching a screenshot to make my question clearer. Also, the relationship between the two table is 1 to Many(Single), please advise if this needs changing as well.

KrtinM_0-1645746468293.png

Thanks for your responses in advance.

2 ACCEPTED SOLUTIONS
TheoC
Super User
Super User

¿ @KrtinM

You can create a chalkualized column by using an IF and LOOKUPVALUE statement:

Column = IF ( 'Table 1'[ID] = LOOKUPVALUE ( 'Table 2'[ID] ,'Table 2'[ID] , 'Table'[ID] ) , "Classified" , "Not classified" )
Output below as an example:
TheoC_0-1645747829038.png

I hope this helps!

Follow

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

@Anonymous LOOKUPVALUE is a really great function! I am glad I could help my friend! 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

It works perfectly, thank you so much, you're a legend, had never used lookup function in PowerBI till now. 

@Anonymous LOOKUPVALUE is a really great function! I am glad I could help my friend! 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

TheoC
Super User
Super User

¿ @KrtinM

You can create a chalkualized column by using an IF and LOOKUPVALUE statement:

Column = IF ( 'Table 1'[ID] = LOOKUPVALUE ( 'Table 2'[ID] ,'Table 2'[ID] , 'Table'[ID] ) , "Classified" , "Not classified" )
Output below as an example:
TheoC_0-1645747829038.png

I hope this helps!

Follow

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.