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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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

@Anonymous ,

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

@Anonymous ,

The following DAX Measure should work:

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

Good Luck and Regards,

Anonymous
Not applicable

Hi rsbin,

 

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

thanks once again

regards,

dsmitha

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.