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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
alya1
Helper V
Helper V

DATEDIFF measure not working (display blank) when difference is greater than ~450 days?

Hi All, 

I have a measure like below that is trying to dynamically find days since separation for customer IDs:

 

Days Seperated = 
VAR CurrentSeparationDate = SELECTEDVALUE('table1'[Sep Date])
VAR CurrentAdditionalSepDate = SELECTEDVALUE('table1'[Additional Sep Date])
RETURN
IF(
    NOT ISBLANK(CurrentSeparationDate),
    DATEDIFF(CurrentSeparationDate, [Date_selected], DAY),
    DATEDIFF(CurrentAdditionalSepDate, [Date_selected], DAY))

 

Sep Date and Additional Sep Date are columns and [Date-selected] is a measure based on a date slicer users can change. 

When I display the measure on a table visual it seems to work fine for some customers but the largest date diff listed is ~450 days. I know for a fact there are customers who separated longer than that (we have more than 20 years of data), but the table visual displays blank for them. 
Does anyone have idea why this is? 
I need to filter the page by Days Separated to be <= 365 or blank in the end! Thank you.

 

1 ACCEPTED SOLUTION
alya1
Helper V
Helper V

Ah apologies everyone, I figured out the problem: it was a date filter on the page that filtered out the sep date through indirect relationship. rookie mistake 

View solution in original post

3 REPLIES 3
alya1
Helper V
Helper V

Ah apologies everyone, I figured out the problem: it was a date filter on the page that filtered out the sep date through indirect relationship. rookie mistake 

FreemanZ
Super User
Super User

hi @alya1 ,

 

how was [Date-selected] defined?

Date_selected = 
CALCULATE(MAX('Calendar'[Date]),ALLSELECTED('Calendar'))

I confirmed that it changes accordingly when the date slicer is edited. 

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.

Top Solution Authors
Top Kudoed Authors