Forum Discussion

Dali7's avatar
Dali7
Frequent Visitor
2 years ago
Solved

Measure to count where value appears in another table and using a filter for containsstring

Hi there   I have produced the tables below based on dummy scenario that matches my actual data, I have two tables that are linked in many to many relationship under Technical Service:   Table 1 ...
  • bhanu_gautam's avatar
    2 years ago

    Dali7 , Ensure that there is a relationship between Table 1 and Table 2 based on the Technical Service column.

     

    Then use DAX to create a measure that counts the incidents where the Technical Service in Table 1 is also in Table 2 and the Title contains the word "Freeze".

     

    DAX
    Count of Freeze =
    CALCULATE(
    COUNTROWS('Table 1'),
    FILTER(
    'Table 1',
    'Table 1'[Technical Service] IN VALUES('Table 2'[Technical Service]) &&
    CONTAINSSTRING('Table 1'[Title], "Freeze")
    )
    )