Forum Discussion

AkhlaqQuestions's avatar
AkhlaqQuestions
New Member
3 years ago
Solved

Measure with a filter clause

Hi all
 
How do I create a Measure that does a count along with a filter (WHERE CLAUSE in SQL) for the word Leave in the status column
 
Leave  =
CALCULATE ( COUNT ( Leavers[ID]
FILTER ( VALUES ( ( Leavers, Leavers[Status] = "Leave" ))

Am I using the correct syntax?

3 Replies

  • aj1973's avatar
    aj1973
    Community Champion
    This should work,
    Leave = CALCULATE ( COUNT ( Leavers[ID]) , Leavers[Status] = "Leave" )
    • AkhlaqQuestions's avatar
      AkhlaqQuestions
      New Member

      Thanks for the reply, 
      Getting an error message

      Too many arguments were passed to the COUNT function. The maximum argument count for the function is 1.

      • aj1973's avatar
        aj1973
        Community Champion

        Try again please I just edited the measure