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
jgulliver
Frequent Visitor

Display the result of the difference between 2 dates (in days) as 0 when 1 of the dates is blank

Hi,

 

Being a newbie to this, I was wondering if this would be possible at all.

 

I am working on relatively unclean data (have yet to advice the business to enforce a data cleansing project) as I wanted to demonstrate via a PowerBI dashboard that you get meaningless/rubbish insights if you don't have clean/meaningful data behind it.

 

I am working on showing the business how long it takes for a deal to go through each sales milestone, i.e., from when an offer was accepted to when a deposit was received. There are a number of entries in the table where I have the Offer Date but with no Accepted date, however, the result that I am being given is in the negative and not sure how this is calculated behind the scenes.

 

So for the formula, I have used Column = INT ([AcceptedDate] - [ReceivedDate]), where the ReceivedDate is 18 Aug 2022 and the AcceptedDate is blank. The result I get is -44791. Two questions please:

1. How did the system calculate this to get a result when there is a missing date?

2. In this scenario, is possible to just show the result as 0?

 

I would like to add that because of the negative numbers the tiles I have used on the dashboard I cannot accurately display a tile that shows the Ave. No. of Days from Offer to Deposit.

 

Any help that anyone can provide will be greatly appreciated.

 

 

Thanks!!!!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @jgulliver 

To show 0 in such case is a good idea. Try like:

 

Column = 
IF(
    [AcceptedDate]=BLANK(),
    0,
    INT ([AcceptedDate] - [ReceivedDate])
)

 

View solution in original post

2 REPLIES 2
jgulliver
Frequent Visitor

Thank you! 

FreemanZ
Super User
Super User

hi @jgulliver 

To show 0 in such case is a good idea. Try like:

 

Column = 
IF(
    [AcceptedDate]=BLANK(),
    0,
    INT ([AcceptedDate] - [ReceivedDate])
)

 

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.