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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Count problem measure

Good morning, everyone,
I am creating a Dax command, which allows calculating the number of category A (which is in the Category column) that have a Success in the Result column. So the result after creating this measure is 4. Here is the illustration to understand more. PS: There are a lot of data like these. 

 

Capture3.PNG

Best regards. Thank you. 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous  - 

If you want it to be specific for Category A, you can create this measure:

Count Success Category A = 
CALCULATE(COUNTROWS(YourTable), YourTable[Category] = "A", YourTable[Result] = "Success")

You could also create your measure to work more generally:

Count Success = 
CALCULATE(COUNTROWS(YourTable), YourTable[Result] = "Success")

Hope this helps,

Nathan

View solution in original post

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

You can use DAX Expression below

 

Measure 4 = 
CALCULATE(
    COUNTROWS( Table ),
    Table[Result] = "Success"
)

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

You can use DAX Expression below

 

Measure 4 = 
CALCULATE(
    COUNTROWS( Table ),
    Table[Result] = "Success"
)

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

@Anonymous  - 

If you want it to be specific for Category A, you can create this measure:

Count Success Category A = 
CALCULATE(COUNTROWS(YourTable), YourTable[Category] = "A", YourTable[Result] = "Success")

You could also create your measure to work more generally:

Count Success = 
CALCULATE(COUNTROWS(YourTable), YourTable[Result] = "Success")

Hope this helps,

Nathan

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors