Forum Discussion
How do I do a VLOOKUP in PBI
The below is my example. I have a list of items that are either stock or not, and some of them have an alternative number. For those that do have an alternative, I want to check if the alternative is a stock item. In measure "Is Item stock?"
The below is the formula I have but is not working:
| Item Number | Item Is stock | Product Name | Item has replacement | Item Alternative Number | Is Item stock? |
| 1234 | Yes | Orange | Yes | 5263 | |
| 1235 | No | Apple | No | 1893 |
I've seen code where I can create a table in the measure section but I can't find it, appreciate your help !
- Anonymous2 years ago
Hi Anonymous ,
If you were creating a measure. You can create as
Is_Alternative_Item_Stock_ = LOOKUPVALUE('Item'[Item Is stock],'Item'[Item Number],SUM('Item'[Item Alternative Number]))Here's the result:
You can download my attachment for more details.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- audreygerredSuper User
Hello! If you want to bring in a value from another table that you have joined, use the RELATED DAX function RELATED function (DAX) - DAX | Microsoft Learn
- AnonymousNot applicable
Thank you for your answer, I think I need to edit my question, I found it over the weekend that the correct statement is how to do a self join, since the measure is in the same table, could you help with this?
- AnonymousNot applicable
Hi Anonymous ,
If you were creating a measure. You can create as
Is_Alternative_Item_Stock_ = LOOKUPVALUE('Item'[Item Is stock],'Item'[Item Number],SUM('Item'[Item Alternative Number]))Here's the result:
You can download my attachment for more details.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.