Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EstherBR
Helper III
Helper III

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 axis to 31 days? Thanks

 

 

1 ACCEPTED SOLUTION
Nabha-Ahmed
Memorable Member
Memorable Member

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

View solution in original post

4 REPLIES 4
Rufyda
Memorable Member
Memorable Member

Hi @EstherBR 

Select the visual

Go to Format → X-axis → Type

Change Continuous → Categorical


The X-axis will display only the actual days in the selected month (28–31 days).

Alternative (if you need a Continuous axis):

Remove the Date Hierarchy

Use the Date column from the Date table

Turn off Concatenate labels

Keep Axis Type = Continuous


The 35-day display is expected behavior on continuous axes. Switching to Categorical is the cleanest fix.

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

SavioFerraz
Kudo Kingpin
Kudo Kingpin

Hello @EstherBR,

This behavior usually happens when the X-axis is still using the Date Hierarchy instead of the Date column (continuous). When you drill down into the hierarchy, Power BI automatically pads the axis to the maximum possible number of days, which is why you see 35 days instead of 31.

 

To force the X-axis to show only the days that actually exist in the selected month, you need to switch from Date Hierarchy → Date (Continuous).

 

How to fix the issue
1. Select the chart

Click the dual-axis chart.

2. Go to the X-axis field well

You will see something like:

Date Hierarchy

Year

Quarter

Month

Day

3. Remove the Date Hierarchy

Click the “X” next to Date Hierarchy.

4. Add the Date column (the raw date field)

Drag the column Date into the X-axis and change the type to:

Continuous

This forces Power BI to render only the dates available in your filtered dataset — which means 31 days max.

 

🎯 Important

If your date slicer is using a relative or range filter, this approach ensures the X-axis automatically respects the selected min/max.

ChatGPT-Plano-para-Super-User-Fabric-12-09-2025_02_11_PM.png

If this information was helpful, please consider giving it a thumbs up. If this answered your question or solved your issue, mark this post as the solution.

GeraldGEmerick
Memorable Member
Memorable Member

@EstherBR If you are using an actual date hierarchy the x-axis should be categorical. I'm not able to replicate this using a date hierarchy and two values. What is the configuration of your date slicer? Is it a between slicer or a list or ? Can you share more information about your setup or possibly a sample file?

Nabha-Ahmed
Memorable Member
Memorable Member

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.