Forum Discussion

kasun_rumesh's avatar
kasun_rumesh
Helper II
9 months ago
Solved

Date Hierarchy

Does anyone know how to create this type of date hierarchy? The slicing behavior seems to different from a normal hierarchy?
I already know how to create a normal hierarchy, but I need this specific hierarchy to use in anomaly detection

Report View

 

 

Model view (Its not visible in model view)

 

 

  • Hi kasun_rumesh ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    In Power BI Desktop for both Import and DirectQuery, the Auto Date/Time hierarchy is generated automatically per date column. Anomaly Detection requires this auto hierarchy, custom hierarchies do NOT work.

     

    In Power BI Semantic Models (Fabric), the below features are not supported.

     

    1. Auto Date/Time hierarchy, Even if the global setting is ON , Fabric models ignore it.

     

    2. Auto-Generated Hidden Date Table, Auto date table is not created, the auto hierarchy cannot exist.

     

    3. Since the semantic model does not create it, anomaly detection cannot slice by Year/Month unless the hierarchy is the auto-generated one.

     

    That's the reason, You see the Date Hierarchy 2. You don’t see the native auto-generated hierarchy. Anomaly detection does not work properly with custom hierarchy. The hierarchy is not visible in Model view, expected auto hierarchies are hidden.

     

    Note: Auto Date/Time is supported only for Power BI Desktop Import or DirectQuery models, not Fabric Semantic Models.

     

    Please try below workarounds.

     

    1. If anomaly detection is a must, Build the model as a Power BI Desktop Import model. Publish it to a workspace not as a Semantic Model. This restores Auto Date Table, Auto Date/Time Hierarchy and Full anomaly detection support.

     

    2. Use report-level anomaly detection in Desktop, It Works only if visual uses A Date column, A numeric measure. But the hierarchy still must be auto-generated , not supported in Semantic Model.

     

    Note: If you need Year/Month anomaly detection, Build or duplicate your model as a Power BI Desktop Import model. Publish that version for reporting. Semantic Models simply do not support the needed auto date hierarchy.

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh

     

     

9 Replies

  • Hi kasun_rumesh 

    Anomaly detection needs the auto date/time hierarchy or a proper marked date table.

    So:

    • Use a Date/Time column so Power BI auto‑creates the hierarchy.

    • Or build a date table, mark it as a date table, then create the hierarchy.

    That way anomaly detection will slice correctly.

     

    Did it work? 👍 A kudos would be appreciated
    🟨 Mark it as a solution to help spread knowledge 💡

     

    🟩 Follow me on LinkedIn

    • kasun_rumesh's avatar
      kasun_rumesh
      Helper II

      Hi,
      It’s not auto-detecting that’s my problem. I used to use it for anomaly detection by year and month.


      Year and Month anomaly detection

       



  • Hi

     

    Did you mean creating a Customized Hierarchy like this so that you can use it in slicer/other charts as below? 

     

    If it is, you can create it manually and add the other columns in this Hierarchy.

     

     

     

    • kasun_rumesh's avatar
      kasun_rumesh
      Helper II

      Hi Thanks,
      No.

       

      Customize hierarchy not going to work with anomaly detection. Power BI auto detecting this one but in my case it's not auto detecting.

      • MasonMA's avatar
        MasonMA
        Super User

        I see, the hierarchy you’re describing sounds like the auto date/time hierarchy that Power BI generates automatically for date fields. When you use anomaly detection or forecasting, those visuals rely on that hierarchy because it’s continuous and comes from a hidden date table.

         

        If you’ve turned on a custom date table or disabled “Auto date/time for new fields” in 'Options-- Data Load', Power BI won’t create that internal hierarchy anymore and you’ll only see your manual year/month fields, which behave differently. To get the original behavior back, you would need to reenable Auto date/time, or use the raw date field (not the one from your custom date table) on the visual’s axis.

  • v-dineshya's avatar
    v-dineshya
    Community Support

    Hi kasun_rumesh ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    In Power BI Desktop for both Import and DirectQuery, the Auto Date/Time hierarchy is generated automatically per date column. Anomaly Detection requires this auto hierarchy, custom hierarchies do NOT work.

     

    In Power BI Semantic Models (Fabric), the below features are not supported.

     

    1. Auto Date/Time hierarchy, Even if the global setting is ON , Fabric models ignore it.

     

    2. Auto-Generated Hidden Date Table, Auto date table is not created, the auto hierarchy cannot exist.

     

    3. Since the semantic model does not create it, anomaly detection cannot slice by Year/Month unless the hierarchy is the auto-generated one.

     

    That's the reason, You see the Date Hierarchy 2. You don’t see the native auto-generated hierarchy. Anomaly detection does not work properly with custom hierarchy. The hierarchy is not visible in Model view, expected auto hierarchies are hidden.

     

    Note: Auto Date/Time is supported only for Power BI Desktop Import or DirectQuery models, not Fabric Semantic Models.

     

    Please try below workarounds.

     

    1. If anomaly detection is a must, Build the model as a Power BI Desktop Import model. Publish it to a workspace not as a Semantic Model. This restores Auto Date Table, Auto Date/Time Hierarchy and Full anomaly detection support.

     

    2. Use report-level anomaly detection in Desktop, It Works only if visual uses A Date column, A numeric measure. But the hierarchy still must be auto-generated , not supported in Semantic Model.

     

    Note: If you need Year/Month anomaly detection, Build or duplicate your model as a Power BI Desktop Import model. Publish that version for reporting. Semantic Models simply do not support the needed auto date hierarchy.

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh

     

     

    • v-dineshya's avatar
      v-dineshya
      Community Support

      Hi kasun_rumesh ,

      We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

       

      Regards,

      Dinesh

      • v-dineshya's avatar
        v-dineshya
        Community Support

        Hi @kasun_rumesh ,

        We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

         

        Regards,

        Dinesh