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
jtpiazzamn
Helper I
Helper I

how to handle "Null" values

I have 2 tables ->

1) DATE table (has dates going from the year 2020 - 2023 and has columns : EndOfQuarter and StartOfQuarter fields)

2) Table which includes fields (Inquiry.ID, Start Date, End Date

 

I'm trying to count how many records have a Start Date starting before 1/1/2023 AND have an End Date after 3/30/2023 OR have an End Date that is BLANK. NOTE: When I look in the Transform Data view, the End Date column has "null" where there isn't a date value. When I look at the table in the "front end" these values are blank. 

 

 

This doesn't give me the correct results. It looks like using BLANK() isn't working due to the "null" value in the End Date dataset. 

ongoing =
VAR EndofQtr = MAX('Date Table'[EndOfQuarter])     
VAR StartoFQtr = MIN('Date Table'[StartOfQuarter])
RETURN
    CALCULATE(
        COUNT('Campaign Inquiry-JSON'[Inquiry.Id]),
        FILTER(ALL('Campaign Inquiry-JSON'),
        'Campaign Inquiry-JSON'[Start Date]<StartoFQtr &&
        ('Campaign Inquiry-JSON'[End Date]>EndofQtr || 'Campaign Inquiry-JSON'[End Date] =
BLANK())
        )
 
Thank you !
1 REPLY 1
danextian
Super User
Super User

Hi @jtpiazzamn 

 

Null (italicized) in the query editor is blank in the designer. And your formula looks correct to me. Without a sample pbix, it will be hard to figure out what  could be wrong. I would start with applying just one logic at a time in your formula to see if it returns the expected result - 'Campaign Inquiry-JSON'[Start Date]<StartoFQtr first followed by 'Campaign Inquiry-JSON'[End Date]>EndofQtr, etc.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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