Forum Discussion
New_Folder
1 year agoHelper I
How do I COUNT IF CONTAINS?
How do I count the number of colors in Table1, Value if it CONTAINS the color in Table 2 Color
I tried the formula below but it only counts the actual Value but not IF IT CONTAINS
COUNT = CALCULATE(
COUNTROWS('Table 1')
COUNTROWS('Table 1')
Try this calculated column in Table2:
Count = VAR vColor = Table2[Color] VAR vResult = COUNTROWS ( FILTER ( Table1, CONTAINSSTRING ( Table1[Value], vColor ) ) ) RETURN vResult
1 Reply
- DataInsightsSuper User
Try this calculated column in Table2:
Count = VAR vColor = Table2[Color] VAR vResult = COUNTROWS ( FILTER ( Table1, CONTAINSSTRING ( Table1[Value], vColor ) ) ) RETURN vResult