Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Count with Conditions & Filter

I am trying to count the number of Records whose status reason is either accepted, rejected or cancelled and I am not getting the right number using this measure   Total Resolved = CALCULATE(DISTI...
  • sevenhills's avatar
    2 years ago

    It is little confusing, your post says as "... status reason is either accepted..." and your DAX syntax uses <>. Taking your DAX and providing below. If you are looking for one of these status reasons, then remove the word "not".

     

    Total Resolved = CALCULATE(DISTINCTCOUNT('Table'[ID]), FILTER('Table', not 'Table'[Status Reason] in { "Accepted", "Rejected", "Cancelled"}))

     

    Output: