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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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