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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ells69
Frequent Visitor

alternative to merge to retrieve description fields

In M 
I have a fact query with many keys in. Lets Call it "Fact". I have several querys that have the matching description

LKUP_Product which consists of [ProductID], [ProductName],[Product Colur]
LKUP_Customer which consists of [CustomerD], [CustomerName]

 

I do not want to Merge the lookups. Is there a way of using
list.Buffer to get a list of ProductID, ProductName
Then a way to compare Fact.ProductID to List of Products to get the ProductName

 

I am sure I have seen this before but cant find my notes or the example again

 

Many thanks

3 REPLIES 3
ells69
Frequent Visitor

Think I will try the solution from @AlienSx  . This is kind of what I am looking for,. My users are a little crazy and we may need to have these links across multiple tables. I like to keep the data model as simple as possible. That way there is less chance of another Dev making a mess or the user selecting unrelated items (this happened yesterday and it is hard to explain to the user why there is an issue) 
Thanks both

M

watkinnc
Super User
Super User

If you're going to be loading these tables to a data model, you can just use a one to many relationship and link them that way. Otherwise I would add a custom column using each Table.FindText.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
AlienSx
Super User
Super User

Hi, @ells69 

1. Create a record of products as p_rec = Record.FromList(LKUP_Product[ProductName], LKUP_Product[ProductID])

2. add new column to Fact (or transform existing) Table.AddColumn(Fact, "ProductName", each Record.FieldOrDefault(p_rec, [ProductID], "none"))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors