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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mgaut341
Helper I
Helper I

Counting blank fields based on another column

I am trying to count how many blank cells I have in my 'status' column when my 'appt date/time' field has a value in the cell. I have tried the following formula

CALCULATE(COUNT('CCHHS Imaging & Procedure'[Appt Date/Time]), FILTER('CCHHS Imaging & Procedure','CCHHS Imaging & Procedure'[Status]=""))
but it gives me the total number of blanks in the Status column regardless of if the Appt Date/Time column has a value 

mgaut341_0-1749829623843.png

 

10 REPLIES 10
techies
Solution Sage
Solution Sage

Hi @mgaut341 please try this

 

Blank Status with Appt =
CALCULATE(
    COUNTROWS('Sheet4'),
    NOT(ISBLANK('Sheet4'[Appt Date/Time])),
    ISBLANK('Sheet4'[Status])
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

That shows up as 0, not the 77 I am looking for

ok, create this calculated column to see the field is blank

 

Status Debug =
IF(
ISBLANK('Sheet4'[Status]),
"True Blank",
"[" & 'Sheet4'[Status] & "] LEN=" & LEN('Sheet4'[Status])
)

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

This is my result 

mgaut341_0-1750195070776.png

 

ok please try this

 

Blank Status with Appt =
CALCULATE(
    COUNTROWS('Sheet4'),
    FILTER(
        'Sheet4',
        NOT(ISBLANK('Sheet4'[Appt Date/Time])) &&
        LEN(TRIM('Sheet4'[Status])) = 0
    )
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978
FBergamaschi
Frequent Visitor

Please provide the pbix file for inspection

 

Best

FB

Does this work?

No Result Test.xlsx

 

v-saisrao-msft
Community Support
Community Support

Hi @mgaut341,

Please provide sample PBIX file that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? 

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

 

Thank you.

DataNinja777
Super User
Super User

Hi @mgaut341 ,

 

To count how many rows have a blank Status while the Appt Date/Time is not blank, you need to use COUNTROWS with a FILTER that checks both conditions. Your current formula only checks if Status is blank, which includes rows even when Appt Date/Time is also blank. The correct DAX formula is:

CALCULATE(
    COUNTROWS('CCHHS Imaging & Procedure'),
    FILTER(
        'CCHHS Imaging & Procedure',
        NOT(ISBLANK('CCHHS Imaging & Procedure'[Appt Date/Time])) &&
        ISBLANK('CCHHS Imaging & Procedure'[Status])
    )
)

This will return the number of rows where Status is blank and Appt Date/Time has a value.

 

Best regards,

Unfortunately, that tells me I have 0 blank cells which is not accurate as I have 76

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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