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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

filling empty cells with 0

Hello,

 

I would like to fill empty cell with zero, how can I do that? As you see on the picture, I have some empty cells...

This is my measure 

Total Pending =
CALCULATE(
    COUNTROWS('CecCaseDetail H'),
    'CecCaseDetail H'[Case] IN {"New", "Enhanced", "Stand" }
)poko_0-1733912719054.png

 

1 ACCEPTED SOLUTION
AnkitaaMishra
Super User
Super User

Hi @Anonymous , 
Try below code : 
Total Pending =
COALESCE(
CALCULATE(
COUNTROWS('CecCaseDetail H'),
'CecCaseDetail H'[Case] IN {"New", "Enhanced", "Stand"}
),
0
)

Thanks, 
Ankita

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

And for this?

 

NewCasesPrecCount =
VAR SelectedYear = SELECTEDVALUE('Calendar'[Date].[Year])
RETURN
    CALCULATE(
        COUNT('CecCaseDetail'[CaseID]),
        'CecCaseEvent'[EventID] = 1,
        YEAR('CecCaseEvent'[EventDate]) = SelectedYear,
        'CecCaseEvent'[CecCaseId] = 'CecCaseEvent'[CecCaseId],
        FILTER(
            'CecLeadingCase',
            'CecLeadingCase'[CecCaseId] = 'CecLeadingCase'[CecCaseId]
        )
    )

Similarly @Anonymous , you can use again COALESCE function : 

NewCasesPrecCount =
VAR SelectedYear = SELECTEDVALUE('Calendar'[Date].[Year])
RETURN
COALESCE(
    CALCULATE(
        COUNT('CecCaseDetail'[CaseID]),
        'CecCaseEvent'[EventID] = 1,
        YEAR('CecCaseEvent'[EventDate]) = SelectedYear,
        'CecCaseEvent'[CecCaseId] = 'CecCaseEvent'[CecCaseId],
        FILTER(
            'CecLeadingCase',
            'CecLeadingCase'[CecCaseId] = 'CecLeadingCase'[CecCaseId]
        )
    ),
0
)



Anonymous
Not applicable

just add COALESCE? Right?

Anonymous
Not applicable

yes it works 🙂

Anonymous
Not applicable

It works Thank you.

AnkitaaMishra
Super User
Super User

Hi @Anonymous , 
Try below code : 
Total Pending =
COALESCE(
CALCULATE(
COUNTROWS('CecCaseDetail H'),
'CecCaseDetail H'[Case] IN {"New", "Enhanced", "Stand"}
),
0
)

Thanks, 
Ankita

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors