Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to count text value

Hi,

 

Request your guidance to solve this issue

 

in my table "salesdistrictwise" got a text field named "status" which contains   "active" or "inactive" data.  I would like to get a count of "active" cases   using a DAX function.  please advice

 

regards,

dsmitha

  

  • Anonymous ,

    The following DAX Measure should work:

    Active_Count = CALCULATE( COUNTA( YourTable[salesdistrictwise) ),
                              FILTER( YourTable, YourTable[salesdistrictwise] = "active" ))

    Good Luck and Regards,

2 Replies

  • rsbin's avatar
    rsbin
    Community Champion

    Anonymous ,

    The following DAX Measure should work:

    Active_Count = CALCULATE( COUNTA( YourTable[salesdistrictwise) ),
                              FILTER( YourTable, YourTable[salesdistrictwise] = "active" ))

    Good Luck and Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi rsbin,

       

      thank you very much for your express reply,  it resolved the issue

      thanks once again

      regards,

      dsmitha