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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
swaxman
New Member

DateDiff Errors

I am pretty new to PowerBI

 

I am trying to do a DateDiff between two tables (OnboardingExcel which has unique records and TroubleTicket which has multiple records related to one ONboardingExcel record).  I have poked around on the forums and amelessly tried a couple solutions, but keep running into errors.

 

DATEDIFF('OnboardingExcel'[StartDate],'TroubleTicket'[Created_Date],DAY)

Error: A single value for column 'Created_Date' in table 'TroubleTicket' cannot be determined...

 

Days Past Start = IF(SUM(OnboardingExcel[StartDate])>SUM(TroubleTicket[Created_Date]),
DATEDIFF(SUM(TroubleTicket[Created_Date]),SUM(OnboardingExcel[StartDate]),DAY)*0,
DATEDIFF(SUM('OnboardingExcel'[StartDate]),SUM('TroubleTicket'[Created_Date]),DAY))

 

Error:Getting An invalid numeric representation of a date value was encountered.

 

Help is greatly appreciated!

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Very difficult to tell what is going on without sample data and relationships.

 

For the first one, perhaps you are missing a relationship, or you have multiple trouble tickets with Created_Date that match your [StartDate]. You might try:

 

DATEDIFF('OnboardingExcel'[StartDate],MAX('TroubleTicket'[Created_Date]),DAY)

For the second on, you can't take a SUM of a true Date or Date/Time column. I would switch all of your SUM's to MIN or MAX. 

 



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

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Very difficult to tell what is going on without sample data and relationships.

 

For the first one, perhaps you are missing a relationship, or you have multiple trouble tickets with Created_Date that match your [StartDate]. You might try:

 

DATEDIFF('OnboardingExcel'[StartDate],MAX('TroubleTicket'[Created_Date]),DAY)

For the second on, you can't take a SUM of a true Date or Date/Time column. I would switch all of your SUM's to MIN or MAX. 

 



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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.