Forum Discussion
Lookupvalue doesnt return expected values
Table 1= Sales Line Table with rows with a certain weigth.
Table 2 = Warehouse Line table with a certain weight
What I wat to do is create a column in my Sales Line Table (Table 1) containing the weight from the Warehouse Lines
I created a string to connect both tables [Combined]
Since the relationship is 1vsmany LOOKUPVALUE doesnt seem to be the way to go.
This is my current situation:
The "Combined" column is where both tables connect.
Is there a way to make LOOKUPVALUE work in this scenario?
8 Replies
- NishudhanFrequent Visitor
Can you please try lookvalue() in the table which has many side of the relationship...it will work
- fbronFrequent Visitor
Nishudhan,
Thank you for the quick response.
Unfortunately im in need for the column to be in the sales table.
Basically what im looking for is that all the wieght from a certain Sales Line is represented in our warehous (warehouse line) the visuals Could be possible that theres no line available in the Warehouse Line Table\
- amitchandakSuper User
fbron , A new column
sumx(filter(Warehouse,Warehouse[Combine] = sales[combine] ) , Warehouse[Weight])
or
Maxx(filter(Warehouse,Warehouse[Combine] = sales[combine] ) , Warehouse[Weight])
- mangaus1111Solution Sage
Hi fbron ,
If you remove the duplicate from the table 'Warehouse line', it should work.
Try to create a temporary table using
ADDCOLUMNS(
DISTINCT('Warehouse line'[Combined]),
"Weight", MAX(Warehouse line'[Weight])
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- fbronFrequent Visitor
mangaus1111 Thank you for the reply.
Followed your suggestion but this resulted in the max weight within the warehouse rowes in each row of the calculated table.
The idea of a calculated table is something that can work for me. Based on the warehouse lines the preferred outcome would be something like this: