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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
sparkplug93751
Helper II
Helper II

Relationships and Lookups

Hello,

 

I have one column that performs a lookup if another column matches criteria: if(category=30,"30",lookupvalue(table1(task),table1(category),task(category)

 

When I try and make a lookup (or relationship) between two tables using this category column the typed data, 30, is not being detected and throwing off my measures?

 

How can this be resolved? They are both data type text

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @sparkplug93751 ,

 

Would you please inform us more detailed information( your sample data(by OneDrive for Business)) if possible? Then we will help you more correctly.

 

Based on your dax formula, I suggest you change it to:

 

 

Column = IF('task'[category] = "30","30",LOOKUPVALUE('table1'[task],'table1'[category],'task'[category])

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@sparkplug93751 

You can move data like this from table2 to table 1

Get from Table 2

New Column = maxx(filter(table2,table2[Col1]= table1[col1] && table2[Col2]= table1[col2] ),table2[required_col])
New Column = maxx(filter(table1,table1[Col1]= earlier(table1[col1]) && table1[Col1]= earlier(table1[col2]) ),table1[required_col])

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
Greg_Deckler
Community Champion
Community Champion

That's really difficult to answer without some data, relationships information, etc. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.