Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filter Dax Function doesn't work

I would like to count rows only when "Number of Days to Recover" column is"Job with no recovery plan" and Job Notes column contains spefici word. Below are my Dax function but it doesn't work. Those ...
  • Greg_Deckler's avatar
    Greg_Deckler
    2 years ago

    Anonymous Try this:

    COUNTROWS(
        FILTER(
            'Service Success Report',
            (
                 'Service Success Report'[Number of Days to Recover] = "Job with no recovery plan" &&
                    ('Service Success Report'[Job Notes] = BLANK() ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "did not attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "didn't attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "could not attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "can't attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "unable to attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "unabel to attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "outside access time") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "no access") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "miss") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "missed") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "re-planned") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "replanned") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "postponed") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "did not occur") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "didn't occur") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "didn't take place") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "did not take place") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "unable to re-attend") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "run incomplete") ||
                    CONTAINSSTRING('Service Success Report'[Job Notes], "run incompleted") ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancelled ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancelled." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancel ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: canceleld." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: canceleld ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancel lift." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancel job ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: canceleld " ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancelled. ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: canvclled ." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: Canceled." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancel down." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: Cancellation." ||
                    'Service Success Report'[Job Notes] = "Cancellation reason: cancel off."
            )
        )
    ))