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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bleysamber
Frequent Visitor

Create a new column in a table based on data in another column

hey all

 

i have a table that contains information in the following format: 

IDCUSTOMFIELDSTRINGVALUE
56959018111text 1
56959018301text 2
5695901841934783
5695901842034786
5695901842134789
5695901842234790
5695901842334795
5695901842434798
5695901843334823
5695901843434828
5695901843534925
56959118111text1
56959218111text2
56959418111text3
5695941841934783
5695941842034786
5695941842134789
5695941842234790
5695941842334795
5695941842434798
5695941842634802
5695941842734929
5695941842834810
5695941842934945
5695941843034815
5695941843134818
5695941843234820
5695941843334823
5695941843434826
5695941843534831

 

lets call this table CUSTOM i have a second table called MAIN that links to CUSTOM in a one to many relationship based on the ID field. As you can see there can be a large number of rows in CUSTOM that have the same ID

 

i know it might be hard to visualize but for multiple reasons i need to create a new column in MAIN that contains the value from CUSTOM[STRINGVALUE] when CUSTOM[CUSTOMFIELD]=18111 AND MAIN[ID] = CUSTOM[ID]

 

i have been trying various things using posts ont his forum but i have not been able to make this work, any help would be appreciated

1 ACCEPTED SOLUTION
OpenDataLab
Helper II
Helper II

Take a look at using the dax function LOOKUPVALUE it works in very much the same way as vlookup in Excel and should help you solve your problem.

 

https://msdn.microsoft.com/en-us/library/gg492170.aspx

 

Let me know how you get on.

 

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @bleysamber,

 

Could you please mark the proper answer if it's convenient for you? That will be a help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
OpenDataLab
Helper II
Helper II

Take a look at using the dax function LOOKUPVALUE it works in very much the same way as vlookup in Excel and should help you solve your problem.

 

https://msdn.microsoft.com/en-us/library/gg492170.aspx

 

Let me know how you get on.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors