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
SL_1983
Helper II
Helper II

Problem with related function

Good morning,

I have a problem with the function related.

I want to create two columns using the function related in the Product table.

I want to have the colums "Laagste Prijs" and "Verpakking Id Laagste Prijs" from the table Verpakking in the product table.

There is a relationship between the two tables (based on the product_id).

So I don't realy understand why I can't find the the tables using the related function.

 

I've added a link to the pbix file. 

pbix file 

 

Can someone help me?

Kind regards,

 

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @SL_1983 ,

 

You can create a column in "Product" Table as follows:

Laagste Prijs = LOOKUPVALUE(Verpakking[Laagste Prijs], Verpakking[Product Id], 'Product'[Product_ID])
 
Similarly you can do for the other required column.
 

If this helps appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
Pragati11
Super User
Super User

Hi @SL_1983 ,

 

You can create a column in "Product" Table as follows:

Laagste Prijs = LOOKUPVALUE(Verpakking[Laagste Prijs], Verpakking[Product Id], 'Product'[Product_ID])
 
Similarly you can do for the other required column.
 

If this helps appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hello,

that indeed does the trick.

Now I want to calculate the cost of the recipe using the lowest price value. I also want to calculate the price based on the package (because even though I don't need the whole package to make the recipe, i still need to buy it).

I've tried it using summarize, but that doesn't work.

 

The link to the file:

https://1drv.ms/u/s!AuaqHTxLCZ_h0n02cC5-BtXWwx3b?e=ljZIHM

HI @SL_1983 ,

 

Can you please mark the solution which ever worked for you?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

amitchandak
Super User
Super User

@SL_1983,I tried something like this as a new column in the product table and seems to work

Column = minx(filter(Verpakking,'Product'[Product_ID]=RELATED('Product'[Product_ID])),Verpakking[Verpakking Id])

 

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.