Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dsmitha
Responsive Resident
Responsive Resident

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

  

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@dsmitha ,

The following DAX Measure should work:

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

Good Luck and Regards,

View solution in original post

2 REPLIES 2
rsbin
Super User
Super User

@dsmitha ,

The following DAX Measure should work:

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

Good Luck and Regards,

dsmitha
Responsive Resident
Responsive Resident

Hi rsbin,

 

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

thanks once again

regards,

dsmitha

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.