Forum Discussion
LOOKUPVALUE with duplicates
Hello,
I currently have one table with an "Order ID" that can, sometimes, have an "Original Order ID", while being an "Order ID"itself. This "Original Order ID" can have more than one "Order ID" inside. I've tried using LOOKUPVALUE but get the "table with multiple values" error.
Both columns could contain duplicates.
I'm trying to create column that flags all "Order ID"s that are also "Original Order ID"s. Something like the "Contains Another Order" column.
Thanks in advance.
You can see an example of the desired result below.
Order ID |Original Order ID |Contains Another Order
| 3832 | No | |
| 6938 | 8742 | No |
| 6938 | 8050 | No |
| 6359 | 8050 | No |
| 8050 | Yes | |
| 7519 | No | |
| 7656 | No | |
| 8920 | 8742 | No |
| 8742 | Yes | |
| 4895 | 7576 | No |
| 7576 | Yes |
SuchCT , Try a new column
New column =
var _ord = [Order ID]
var _cnt = countx(filter(Table,[Original Order ID] =_ord),[Order ID])
return
if(isblank(_cnt), "No", "Yes")
2 Replies
- amitchandak
Super User
SuchCT , Try a new column
New column =
var _ord = [Order ID]
var _cnt = countx(filter(Table,[Original Order ID] =_ord),[Order ID])
return
if(isblank(_cnt), "No", "Yes")- SuchCT
Helper II
Thank you so much! That's exactly the solution for my problem.