Forum Discussion

EstherBR's avatar
EstherBR
Helper III
8 months ago
Solved

Max Min date X-axis

Hi,   I have a dual axis chart with a date hierarchy in the X-Axis and a date slicer. When I select a whole month and drill down to day, the X-axis displays 35 instead of 31. How can I limit the X ...
  • Nabha-Ahmed's avatar
    8 months ago

    Hi EstherBR

    This happens because Power BI is using a Continuous axis, not a categorical one.
    When you drill down into “Day,” Power BI automatically pads the axis to a full 35-day range to keep spacing consistent across months.

    ✔ To fix it, you must switch the X-axis to Categorical instead of Continuous.


    ---

    🔧 Steps to fix the issue

    1. Click your chart


    2. Go to Format → X-axis


    3. Find Type


    4. Change from Continuous → Categorical

     

    Result:

    The X-axis will now show only the days that exist in the selected month

    No more 35-day automatic padding

    Works with drill-down + slicers

     

    ---

    ⚠️ If you still need Continuous behavior (e.g., line smoothness)

    Here’s an alternative fix:

    ✔ Use the day column from your Date table instead of the hierarchy:

    1. Remove Date Hierarchy


    2. Add Date from your Date table


    3. Turn Off “Concatenate Labels”


    4. Keep Axis Type = Continuous


    5. Apply a slicer from the same Date table (Month selected)

     

    This will perfectly limit the X-axis to the real number of days in that month.


    ---

    📝 Extra note

    The “35 days” is not a bug — it’s Power BI’s default padding on continuous axes.
    Switching to Categorical is the cleanest and most common fix