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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
gcongrove
Frequent Visitor

Measure to calculate the number of times a text string appears in a column, that also displays 0

Hello,

I am tracking Incident tickets and reporting in their status (Open, Closed, Pending, In Progress, Resolved)

Here is a look at my data.    I want to report on how many INC are Open or closed etc.  But I also want to display 0 if I currently have no count for a particular  INC's.   For instance, if there are no currently open tickets.
Capture.PNG

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

 
You could use these DAX measures in a card.
The + 0 forces a value to be returned when there is none.
For example Fixed will = 0

Open = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Open") + 0
Closed = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Closed") + 0
Fixed = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Fixed") + 0
Does that answer your question?

View solution in original post

2 REPLIES 2
speedramps
Super User
Super User

 
You could use these DAX measures in a card.
The + 0 forces a value to be returned when there is none.
For example Fixed will = 0

Open = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Open") + 0
Closed = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Closed") + 0
Fixed = CALCULATE(COUNTROWS(Incidents),Incidents[Status]="Fixed") + 0
Does that answer your question?

Exactly what I needed, thank you! This will help me in several other reports as well.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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