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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AutyDA
Helper I
Helper I

Dynamic Time Axis

Hi

 

I have a table which has financial data for quarters and annually for different companies and I want to switch between the two using a slicer and for the time axis to change from displaying the year and quarter number (e.g. 2020 Q1) to just the year (eg 2020) but I can´t get it to work. As you can see below when I use the slicer to switch from the annual to the quarterly data the time axis shows the data as year and quarter because the date hierarchy for the axis is set to show year and quarter - this will confuse the user.

 

AutyDA_0-1726990802708.png

 

 

AutyDA_1-1726990832815.png

 

AutyDA_2-1726991415457.png

 

 

 

Here is a link to the sample data file and pbix SampleData.pbix 

 

Any ideas how to get this working?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AutyDA ,

 

I think you can try to sort your visual by axis [Year Quarter] field.

Result is as below.

vrzhoumsft_0-1727229249957.png

 

Best Regards,
Rico Zhou

 

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

8 REPLIES 8
danextian
Super User
Super User

Hi @AutyDA 

 

You can use field parameters to switch between dimensions. Please take note that it allows one dimension at a time only. Please see this post:

https://community.fabric.microsoft.com/t5/Desktop/Change-axis-Date-Hierachy-based-upon-a-slicer/m-p/... 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi, this solution unfortunately loses the order on the x axis with items not being placed according to date.

What do you mean by "loses the order"? If you are using a dimension that is a not a date or a number, that dimension will be sorted alphabetically unless custom sorted by a different column. https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Hi @AutyDA ,

 

I think your data model doesn't support Field Parameter function. There is a column [Quarter or Year] to determine whether quarters or years.

I suggest you to use the [Year] and [Quarter] column from sheet1 in your visual, when you select Year, Quarter will show blank.

vrzhoumsft_0-1727158444874.png

vrzhoumsft_1-1727158457309.png

Or you can try Bookmark navigator.

vrzhoumsft_2-1727158873154.png

You can download my sample to learn more details.

 

Best Regards,
Rico Zhou

 

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

 

 

Rico,

 

Using the [Year] and [Quarter] column from sheet1 in the visual works exactly as you say. In your pbix file the visual shows the years and quarters in the right order (year Q 1, 2, 3 then 4). When I try to put this in to my work it does not do so, the chart orders the axis according to the largest revenue number. Also in your file if I remove the [Year] and [Quarter] column from the axis and then put them back it also loses the order and lists everything by largest revenue. Am I missing something really simple to get this working or is this something related to the bookmark?

 

This shows an example of what I get:

 

AutyDA_0-1727171765682.png

 

Anonymous
Not applicable

Hi @AutyDA ,

 

I think you can try to sort your visual by axis [Year Quarter] field.

Result is as below.

vrzhoumsft_0-1727229249957.png

 

Best Regards,
Rico Zhou

 

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

 

Rico, thank you. I knew there had to be a simple way of doing this which I was missing. Clicking the 3 dots for more options in the top right of the visualization allows you to select the form of sorting the axis as you wish. Perfect, thanks.

Selva-Salimi
Super User
Super User

Hi @AutyDA 

 

you can use bookmarks! (https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks?tabs=powerbi-desktop)

 

If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.