cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

The returned values are false because i have a result = 2089/09/16 

 Sans titre.png

fhill Solution Sage
Solution Sage

Re: How do an average for a column type date

Can you add 'NumDays' to this example, i'm curious what your 5 digit dates look like...???

AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

Sans titre.png

 

NumDays = DATEDIFF(0;IF(TECHNIKE[THCJDATE]>0;TECHNIKE[THCJDATE];0);DAY)

AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

DATE MOY = FORMAT(DATE(2000;1;INT(AVERAGE(TECHNIKE[NumDays])-36523));"YYYY-MM-DD")

AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

Sans titre.png

fhill Solution Sage
Solution Sage

Re: How do an average for a column type date

Here is the issue...  These values are wrong...  I'm not sure how your 'Date MOY' is being caculated (or where it's from) but 2015-12-08 and 2015-12-06 should only be 2 NUMDays apart, not 230,000+

AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

I try to modify the colum but i have an error and i don't understand why i have this error

Sans titre.png

Microsoft v-yulgu-msft
Microsoft

Re: How do an average for a column type date

Hi @AlexGallet01,

 

What does the error message point to? Could you please translate it to English?

 

Regards,
Yuliana gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlexGallet01 Helper IV
Helper IV

Re: How do an average for a column type date

Hi,

 

My start date are above my end date

 

Or it's impossible because my start date are 0

Microsoft v-yulgu-msft
Microsoft

Re: How do an average for a column type date

Hi @AlexGallet01,

 

To use DateDiff function, we should meet the syntax that "the start date cannot be greater than end date". Otherwise, it will prompt error.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors