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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
gopinath25
Frequent Visitor

Need help to create a new Column in Table 1 by comparing another table value

Need help to create a new Column in Table 1 by comparing another table value without any relationship. Appreciate your help


Example below : 
Example hereExample here

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Try somehing like this:

Column =
var _c = ItemExample[Item] return
CALCULATE(MAX('Matrix example'[Material]),ALL('Matrix example'),CONTAINSSTRING('Matrix example'[Item],_c))
 
Example tables:
Matrix example
ValtteriN_0-1643920689222.png

Item example

ValtteriN_1-1643920716829.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
gopinath25
Frequent Visitor

@ValtteriN - You saved my time . Here the output Query
NewColumn4 =

var _c = Table1[Column1] return
CALCULATE(MAX(Table2[Column2]),ALL(Table2),CONTAINSSTRING(_c,Table2[Column1]))

ValtteriN
Super User
Super User

Hi,

Try somehing like this:

Column =
var _c = ItemExample[Item] return
CALCULATE(MAX('Matrix example'[Material]),ALL('Matrix example'),CONTAINSSTRING('Matrix example'[Item],_c))
 
Example tables:
Matrix example
ValtteriN_0-1643920689222.png

Item example

ValtteriN_1-1643920716829.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.