Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

DATEDIFF messes with result

Hello,

 

I am using the datediff function to get the days between Begin and End date.

But is doenst count the days right.

 

My daxfunction is: #Days = DATEDIFF(Data[Begindate];Data[Enddate];DAY)

 

What am i doing wrong?

 


 

 

 

 

 

 

 
  • Anonymous's avatar
    Anonymous
    7 years ago

    evandrocunico 

    My fault alright. It had set an auto sum on the field.

    I see that on a custom column a sum isnt shown with a total sign, so i didnt recgonised it at first.

4 Replies

  • Hi Anonymous maybe check data type and format to begin and end date.

     

    Regards.

    • Anonymous's avatar
      Anonymous
      Not applicable

      evandrocunico 

      Thanks for you reply.

      I checked the format of the field and both are set to DATE

      • evandrocunico's avatar
        evandrocunico
        Icon for Resolver III rankResolver III

        I create a column DAYS, it works.

         

        Can you provide the pbix?