Forum Discussion

bo_afk's avatar
bo_afk
Icon for Post Patron rankPost Patron
6 years ago
Solved

Incorrect year in date hierarchy

Hi,

 

I have a date column in my data with the following format dd/mm/yyyy. However, in my date hierarchy, which was automatically created in Power BI, the years it's returning is incorrect.

 

It's showing years from 1901 to 2020, whereas in the data, I only have years 2017 to 2020. Anyone have an idea why it's appearing like this?

 

Thanks

afk

  • bo_afk's avatar
    bo_afk
    6 years ago

    Hi vanessafvg , you're right. It looks like the date hierarchy is just adding in those extra years in the slicer even though the data doesn't actually exist.

     

    When I filter for the incorrect years, it doesn't return any data.

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    it's a very broad definition of the issue, but I would first check date formats. Are they coherent with your data source? Where are you getting data from?

    • bo_afk's avatar
      bo_afk
      Icon for Post Patron rankPost Patron

      They're set up with data type as "date", with the format dd/MM/yyyy.

       

      Data is coming from a table in SQL server. But when I bring this data into Power BI, and it creates the date hierarchy, the Years don't correspond correctly to the date.

      • vanessafvg's avatar
        vanessafvg
        Icon for Community Champion rankCommunity Champion

        1901 is often a year used when the date value is unknown.   

         

        what table are you bringing the year from, have you done a mix and max on that table?

         

         

        i would do more digging in the data.