Forum Discussion
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!
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.
2 Replies
- amitchandak
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
- v-yuta-msft
Community Support
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.