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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Mickoso
Regular Visitor

How to make the axis label change according to a filter applied to a setting?

Hi all, I have a question about the x-axis for different filters. I would like when filtering by range date, in x-label is years. But when I filter by a single year the x-label be months.

 

Is it possible? 

 

Regards.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Mickoso ,

I don't think that's gonna happen for a while. I can give you two workarounds:
First:
Here is my sample data:

vjunyantmsft_0-1707270843029.png

Set a field parameter:

vjunyantmsft_1-1707270937288.png

Put parameter into X-axis and Value into Y-axis:

vjunyantmsft_2-1707270982957.png

The output is as below:

vjunyantmsft_3-1707271013763.png

vjunyantmsft_4-1707271024170.png

After switching the X-axis display, use the range date filter or single year filter to filter the content.

Second:
First create a date range slicer and a visual object with the year as the x-axis, set a bookmark to that state.

vjunyantmsft_5-1707271216316.png
Then create a single year slicer and a visual object with the month as the x-axis, set another bookmark for that state.

vjunyantmsft_6-1707271357712.png

Set a button for each of the two bookmarks to toggle the display by clicking the button. You can refer to this post for specific steps:
Solved: chart type change on published bookmarks - Microsoft Fabric Community

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Mickoso ,

I don't think that's gonna happen for a while. I can give you two workarounds:
First:
Here is my sample data:

vjunyantmsft_0-1707270843029.png

Set a field parameter:

vjunyantmsft_1-1707270937288.png

Put parameter into X-axis and Value into Y-axis:

vjunyantmsft_2-1707270982957.png

The output is as below:

vjunyantmsft_3-1707271013763.png

vjunyantmsft_4-1707271024170.png

After switching the X-axis display, use the range date filter or single year filter to filter the content.

Second:
First create a date range slicer and a visual object with the year as the x-axis, set a bookmark to that state.

vjunyantmsft_5-1707271216316.png
Then create a single year slicer and a visual object with the month as the x-axis, set another bookmark for that state.

vjunyantmsft_6-1707271357712.png

Set a button for each of the two bookmarks to toggle the display by clicking the button. You can refer to this post for specific steps:
Solved: chart type change on published bookmarks - Microsoft Fabric Community

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Mickoso , I doubt you can change axis based on selection.

 

But you can use and and continuous axis

 

Axis_type.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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