The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Here is a link to the sample data file and pbix SampleData.pbix
Any ideas how to get this working?
Solved! Go to Solution.
Hi @AutyDA ,
I think you can try to sort your visual by axis [Year Quarter] field.
Result is as below.
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.
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:
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
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.
Or you can try Bookmark navigator.
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:
Hi @AutyDA ,
I think you can try to sort your visual by axis [Year Quarter] field.
Result is as below.
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.
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.