Forum Discussion
Craigo
3 years agoRegular Visitor
Using a comma separated column to lookup a value in another unrelated table
Hello. I have one table with comma separated column and I want to look up each value in another unrelated table and if it exists, get the value from a different column in that second table and create...
- 3 years ago
Mate, that works brilliantly. I'll do some more testing with a slightly more complex set of tables, but I think this will work. Thanks very much for your help.
barritown
Solution Sage
3 years agoHi Craigo,
There is also such an option:
- split the comma separated lists in the [Item_Code] column of your second table into separate rows using this solution - https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-with-comma-delimited-text-split-into-rows-in-a/m-p/1494014;
- once done, the following calculated column does the rest:
Item_desc =
MINX ( FILTER ( Ref, CONTAINSSTRING ( [Sales_Code], [Item_Code] ) ), [Item_desc] )
Best Regards,
Alexander
Craigo
3 years agoRegular Visitor
Mate, that works brilliantly. I'll do some more testing with a slightly more complex set of tables, but I think this will work. Thanks very much for your help.