Forum Discussion

rwoodward's avatar
rwoodward
Frequent Visitor
1 year ago
Solved

Counting Text from One Table to Another

Hello - I need to create a DAX that allows me to count the number of times the names in [Table 2, column Name] appear in [Table 1, column Names]. The 3rd table is how Table 2 should appear when the D...
  • Fowmy's avatar
    1 year ago

    rwoodward 

    Add the following calculated column to Table 2:

    Count of Appearances= 
    VAR NameToSearch = 'Table2'[Name]
    RETURN
        COUNTROWS(
            FILTER('Table1', 
                SEARCH(NameToSearch, 'Table1'[Names], 1, 0) > 0
            )
        )