Forum Discussion

waleed111's avatar
waleed111
Helper V
5 years ago
Solved

YEAR and MONTH function

i write this formula:

Year A = YEAR('All Manufacturings (4)'[Added Time])
but when i try to covert it to date type it show wrong value, it show me 1900 for all value, what is the problem?
  • Hi, waleed111 

    I can reproduce your issue here.

    I guess that you column "Year A" is of type "DATE".

    As mentioned in this document ,function "Year"  returns the year of a date as a four digit integer in the range 1900-9999.

    It is suggest to convert your column  "Year A" to type "text"  

     

    Best Regards,
    Community Support Team _ Eason

6 Replies

      • amitchandak's avatar
        amitchandak
        Super User

        waleed111 , this is strange, Can you share sample  pbix after removing sensitive data.

         

        Try this

        Year A = format('[Added Time],"YYYY")

         

        Hope you do not have another table. Try without a table name

        Year A = YEAR('[Added Time])