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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
claudia-amm
Helper I
Helper I

Dynamic X Axis via Slicer

Hi everyone.

I'm trying to make a bar chart with date as a X axis.

It displays in "days" but I want the x axis change into "weeks" when I select date range more than 30 days.

 

For example:

I select date range 1/1/2020 - 5/2/2020 so the x axis in bar chart show "weeks" not in "days".

 

Can power BI do that?

 

I hope you understand what I mean.

 

Thankyou!

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@claudia-amm ,

 

You can create a new week number column using WEEKNUM(). And drag that column to X-axis. Please refer to:

https://docs.microsoft.com/en-us/dax/weeknum-function-dax

 

Community Support Team _ Jimmy 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
v-yuta-msft
Community Support
Community Support

@claudia-amm ,

 

You can create a new week number column using WEEKNUM(). And drag that column to X-axis. Please refer to:

https://docs.microsoft.com/en-us/dax/weeknum-function-dax

 

Community Support Team _ Jimmy 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

@claudia-amm , I doubt unless you use some custom visual you can do that easily. Or you can manipulate bookmarks

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.