Forum Discussion

bdehning's avatar
bdehning
Post Prodigy
2 years ago
Solved

Need Date Hierarchy

I copied a table from a power Bi Report that had a YEARMonth Date Hierarchy.  When I placed table

into my other Power Bi Report, I no longer see the Calendar Icon next to YEARMonth or the Date Hierarchy with Year, Quarter Month and Day is not there either.  Why did it not copy and how do I create a Date Hierarchy for YEARMonth Date Field in my new report?

  • I did not realilze I had turned off Auto date/time under Time Intelligence.  I turned it back on and I see Date Hierarchy.  

3 Replies

  • lucadelicio's avatar
    lucadelicio
    Impactful Individual

    Hi,
    you need to create a column date type from the text YYYYMM.
    So you can use the DATE(<year>, <month>, <day>) dax function.
    You can try something like this:
    DateType =
    DATE(LEFT(YYYYMM, 4), RIGHT(YYYYMM, 2), "01")
    Then set this column as Date type.

    Pay attention to type during the conversion.
    Mark as solution my reply if i help you.
    Thank you.

  • I did not realilze I had turned off Auto date/time under Time Intelligence.  I turned it back on and I see Date Hierarchy.  

    • lbendlin's avatar
      lbendlin
      Super User

      Auto Date Time is a bad idea, it should be off in the majority of cases.  Use your own hierarchies.