Forum Discussion

Lobo1908's avatar
Lobo1908
Helper I
3 years ago
Solved

Count rows with additional values in the string

Hi,  I'm looking for a measure that would allow me to count rows with some values in the string.  I've got a table with a column serial numbers and a column with codes assigned to those serial numb...
  • Mikelytics's avatar
    3 years ago

    Hi Lobo1908 

     

    Please try the following

    CountWIhtouQ0001 = 
    SUMX(
        VALUES('Table'[Serial]),
        IF(
            CONCATENATEX(
                'Table',
                TRIM(SUBSTITUTE([Q Codes],"Q0001",""))
            )
            <>"",1,0
        )
    )
        

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.