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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Power BI My Datediff formula keeps on giving me blanks

Hello Everyone, 

 

I am trying to take a formula from excel and translate it into power Bi. It looks like it working but I am getting blanks

 

Jan 19 Open Age = If(AND('FreshService Data RAW'[Created Date]<= 1/31/2019,'FreshService Data RAW'[Resolved Date] > 1/31/2019),DATEDIFF(1/31/2019,'FreshService Data RAW'[Created Date],Day))
 
I would love somone help. why is my formula not working?
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

Jan 19 Open Age = If(AND('FreshService Data RAW'[Created Date]<= DATE(2019,1,31),'FreshService Data RAW'[Resolved Date] > DATE(2019,1,31)),DATEDIFF(DATE(2019,1,31),'FreshService Data RAW'[Created Date],Day))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

Jan 19 Open Age = If(AND('FreshService Data RAW'[Created Date]<= DATE(2019,1,31),'FreshService Data RAW'[Resolved Date] > DATE(2019,1,31)),DATEDIFF(DATE(2019,1,31),'FreshService Data RAW'[Created Date],Day))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  

Thank you so much for the help, I changed it a little to not get negative numbers but it worked perfectly. 

@Anonymous Yep.

 

"1/31/2019" is not interpreted as a date but rather the number (1 / 31) / 2019 = 0.00001597724 which is equivalent to 12/30/1899 12:00:01 AM as a datetime value.

Anonymous
Not applicable

That makes sense, Thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.