0

I have a column of drawing numbers and a list of codes. I want to see if any of the drawing numbers contain any codes, I just can't seem to find a way to compare the list and extract these codes.

If anyone can point me in the right direction that would be really helpful.

1

1 Answer 1

0

This is an idea how to get a table with columns drawing no. - list of codes. Hope, this will help, if not add a data sample and a result sample.

VAR drawings=VALUES(myTbl[drawing])

VAR drawingsAndCodes=
        ADDCOLUMNS(
            drawings
            ,"codes",VAR dr=[drawing] 
                     VAR codes=VALUES(myTbl[code])
                        RETURN CONCATENATEX(
                            FILTER(
                                codes
                                ,Search([code],dr,1,0)>0),[code],";"))
  
  
RETURN
    drawingsAndCodes
       

The Measure for matrix

VAR dr=SELECTEDVALUE(myTbl[drawing]) 
VAR codes=VALUES(myTbl[code])
RETURN CONCATENATEX(
                        FILTER(
                            codes
                            ,Search([code],dr,1,0)>0),[code],";"))
Sign up to request clarification or add additional context in comments.

9 Comments

i get an error The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
It returns a table, not a single value. Add a result sample, this will help to get a right output.
Do you want to put the measure into a matrix?
Do you have any linkage for columns?
I added the measure for matrix
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.