Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Date

I took a date in a Database with the year 18,19,20,21,22 and i load it but it came as decimal but when i try to convert these to Date it comes out as 1900. and i don't know how to get the right dat...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    Please try below steps:

    1. below is my test table

    Table:

     

    2. add a new column with below dax formula

    Agjust Year =
    VAR _val = INT ( "20" & [Year] ) RETURN DATE ( _val, 1, 1 )
    

     3. set the format in Power BI Desktop

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    3 years ago

    It is working. Thank you very much