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
Anonymous
Not applicable

DateDiff Errors

Hello

 

Trying to calculate the amount of days between 2 date columns. Tried DateDiff but receiving an error. 

I want to see if Drawings Approved is within 2 weeks of Drawings Submitted. And then from there visualize the outliers. 

 

Step 1 was to count the days between the two columns.

 

CCTV Days bt ReviewApproved = DATEDIFF(MIN( 'Current Master List'[CCTV Drawings Approved by Brand (Date) ].[Date]), MAX( 'Current Master List'[CCTV Drawings Submitted to Brand (Date)].[Date], day ) ) 

I receive the error that too few arguments are happening, although it's the same as the formula online but updated with my columns.

 

Note: not all fields are completed and there many blanks- maybe this is causing it to error?

1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous,

 

Unfortunately I wasn't able to reproduce your error.

 

Using my sample data:

 

ApprovedDateSubmittedDate
7/1/20187/2/2018
7/1/20187/3/2018
7/1/20187/4/2018
7/1/20187/5/2018
7/1/20187/6/2018
7/1/20187/7/2018
7/1/20187/8/2018
7/1/20187/9/2018
7/1/20187/10/2018
7/1/20187/11/2018
7/1/20187/12/2018
7/1/20187/13/2018
7/1/20187/14/2018
7/1/20187/15/2018
7/1/20187/16/2018
7/1/20187/17/2018
7/1/20187/18/2018
7/1/20187/19/2018
7/1/20187/20/2018
7/1/20187/21/2018
7/1/20187/22/2018
7/1/20187/23/2018
7/1/20187/24/2018
7/1/20187/25/2018
7/1/20187/26/2018
7/1/20187/27/2018
7/1/20187/28/2018
7/1/20187/29/2018
7/1/20187/30/2018
7/1/20187/31/2018

 

I created the following Calculated Columns:

 

Column = DATEDIFF(Table1[ApprovedDate],Table1[SubmittedDate],DAY)

Column 2 = DATEDIFF(MIN(Table1[ApprovedDate]),MAX(Table1[SubmittedDate]),DAY)

Column 3 = 
IF(
   DATEDIFF(Table1[ApprovedDate],Table1[SubmittedDate],DAY) <= 14,
   TRUE(),
   FALSE()
) 

Which produced the following:

 

1.PNG

 

I believe what you're after is something like what exists in [Column 3] correct?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

1 REPLY 1
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous,

 

Unfortunately I wasn't able to reproduce your error.

 

Using my sample data:

 

ApprovedDateSubmittedDate
7/1/20187/2/2018
7/1/20187/3/2018
7/1/20187/4/2018
7/1/20187/5/2018
7/1/20187/6/2018
7/1/20187/7/2018
7/1/20187/8/2018
7/1/20187/9/2018
7/1/20187/10/2018
7/1/20187/11/2018
7/1/20187/12/2018
7/1/20187/13/2018
7/1/20187/14/2018
7/1/20187/15/2018
7/1/20187/16/2018
7/1/20187/17/2018
7/1/20187/18/2018
7/1/20187/19/2018
7/1/20187/20/2018
7/1/20187/21/2018
7/1/20187/22/2018
7/1/20187/23/2018
7/1/20187/24/2018
7/1/20187/25/2018
7/1/20187/26/2018
7/1/20187/27/2018
7/1/20187/28/2018
7/1/20187/29/2018
7/1/20187/30/2018
7/1/20187/31/2018

 

I created the following Calculated Columns:

 

Column = DATEDIFF(Table1[ApprovedDate],Table1[SubmittedDate],DAY)

Column 2 = DATEDIFF(MIN(Table1[ApprovedDate]),MAX(Table1[SubmittedDate]),DAY)

Column 3 = 
IF(
   DATEDIFF(Table1[ApprovedDate],Table1[SubmittedDate],DAY) <= 14,
   TRUE(),
   FALSE()
) 

Which produced the following:

 

1.PNG

 

I believe what you're after is something like what exists in [Column 3] correct?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



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