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
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
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.

Top Kudoed Authors