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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pbi1908
Helper III
Helper III

Combine LOOKUPVALUE WITH MAX OR SUMX VALUE

Hi guys, 

 

I have 2 tables which are not connected between them and there is no way to connect them. 

 

In the one table i have Purchases and in the other table i have Containers. In each line in containers table  i have the Supplier Weight and the related Purchase id. So i want in the Purchase table to get the Total Supplier Weight e.g in for one Purchase i have 2 Containers with Supplier Weight 10 tons and 40 tons in Purchase table for this specific purchase i want to see 50 tons. 

 

What i did i summarized the Supplier Weight in Containers table in new column so for example considering the previous example i have 50 in both containers in the New column that i created. 

 

Then i tried to get this column in the purchase table using LOOKUPVALUE but in some cases i am getting the correct result in some cases i am getting null. Is there a way to choose the max for example within the lookup value or any other way to calculate what i want ?

6 REPLIES 6
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26Rhli8INeP9nLmP1aL?e=mTtboG

Screen Capture #728.png

pbi1908
Helper III
Helper III

The tables are in this structure like the screenshot below, I cannot use the RELATED because my tables are not connected and i can't connect them. 

 

pbi1908_0-1679499199745.png

 

Well, what result are you expecting? show me too

pbi1908_0-1679524327780.png

 

This is the result i expect. So the total weight for each shipment which is in the Containers table. 

 

Yashh
Helper II
Helper II

Hello @pbi1908 

 

Try using RELATED() function.

 

BR

Yashh 

Ahmedx
Super User
Super User

Share some data to work with (in a format the can be pasted in an MS Excel file or screenshot) and show the expected result.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.