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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Can you hide elements of the X-axis based on certain criteria?

Hi, I wish I could hide the elements of the X-axis where the line is constant or where there are no columns, this way I can only see the points where there are really changes. The columns and points are represented by measurements, while the X-axis is represented by a column of a table. Is there a way to achieve this?

Jaumedomi_0-1741940270477.png

1 ACCEPTED SOLUTION
freginier
Super User
Super User

Hey there!

 

Power BI does not provide a direct way to conditionally hide X-axis elements, but you can achieve a similar effect using filters and calculated columns/measures.

If you want to show only points where there are real changes and hide constant values, create a DAX measure that filters out unchanged values:

ShowPoint =
VAR CurrentValue = SELECTEDVALUE(YourTable[Measurement])
VAR PreviousValue =
CALCULATE(
MAX(YourTable[Measurement]),
FILTER(YourTable, YourTable[Date] < MAX(YourTable[Date]))
)
RETURN
IF(CurrentValue <> PreviousValue, 1, BLANK())

1. Apply this measure as a filter in your visual.

2. Set "Show items when value is not blank".

 

If you want to hide X-axis labels when values are constant:

  1. Go to X-Axis settings in Format pane.
  2. Use a conditional formatting rule for labels:
    • Create a new column:

HideLabel = IF(YourTable[Value] = PreviousValue, BLANK(), YourTable[Date])

Set X-axis labels to use HideLabel instead of the full dataset.

 

Hope this helps!

😁😁

 

 

View solution in original post

4 REPLIES 4
v-pnaroju-msft
Community Support
Community Support

Hi Syndicate_Admin,

We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.

If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi Syndicate_Admin,

We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.

If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Thank you, @freginier,for your response.

 

Hi Syndicate_Admin,

 

We would like to check if the solution provided by @freginier has resolved your issue. If you have found an alternative approach, we encourage you to share it with the community to assist others facing similar challenges.

If you found the response helpful, please mark it as the accepted solution and add kudos. This recognition benefits other members seeking solutions to similar queries.

 

Thank you.

freginier
Super User
Super User

Hey there!

 

Power BI does not provide a direct way to conditionally hide X-axis elements, but you can achieve a similar effect using filters and calculated columns/measures.

If you want to show only points where there are real changes and hide constant values, create a DAX measure that filters out unchanged values:

ShowPoint =
VAR CurrentValue = SELECTEDVALUE(YourTable[Measurement])
VAR PreviousValue =
CALCULATE(
MAX(YourTable[Measurement]),
FILTER(YourTable, YourTable[Date] < MAX(YourTable[Date]))
)
RETURN
IF(CurrentValue <> PreviousValue, 1, BLANK())

1. Apply this measure as a filter in your visual.

2. Set "Show items when value is not blank".

 

If you want to hide X-axis labels when values are constant:

  1. Go to X-Axis settings in Format pane.
  2. Use a conditional formatting rule for labels:
    • Create a new column:

HideLabel = IF(YourTable[Value] = PreviousValue, BLANK(), YourTable[Date])

Set X-axis labels to use HideLabel instead of the full dataset.

 

Hope this helps!

😁😁

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.