Forum Discussion
Calculate column with 2 tables without relation
Hi experts!
I'm very new in Power BI and DAX and I would like to request your help, pls...
I have 2 different tables with different fields and without relation, to explain fastly, I gonna use the important fields for this calculation.
- OOS_Calculations
- ID_sender
- product "New column"
- Product_box
- device
- text_product
I need to create a new column in OOS_Calculations with the following condition:
If "ID_sender" is equal to "abc" in OOS_Calculations and "device" is equal to "abc" in Product_box, then return "text_product" in the new column in OOS_Calculations
Is there anybody suggest something, I will be very grateful
Thanks!
- Anonymous7 years ago
Hey afi_imco,
For finding values between two tables without a relationship you can use the LOOKUPVALUE function. If I understand your question correctly, you want it to return text_product when ID_sender is equal to device. If so, the formula looks like this:
TEXT_PRODUCT = LOOKUPVALUE(Product_box[text_product],Product_box[device],OOS_Calculations[ID_sender])
Hope this helps.
2 Replies
- AnonymousNot applicable
Hey afi_imco,
For finding values between two tables without a relationship you can use the LOOKUPVALUE function. If I understand your question correctly, you want it to return text_product when ID_sender is equal to device. If so, the formula looks like this:
TEXT_PRODUCT = LOOKUPVALUE(Product_box[text_product],Product_box[device],OOS_Calculations[ID_sender])
Hope this helps.
- afi_imcoFrequent Visitor
Dear Anonymous,
It perfectly fit my current requirement. I appreciate your help!