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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Espen1515
Advocate I
Advocate I

Invert x axis

Hi,

 

My graph is displaying itself the wrong way around. I want it to be chronological according to date, but instead its counting backwards in time, like this:

Graph.png

How can I invert the axis so that is displays it the other way around? 2018 20, 2018 21, etc. This is a week-on-week-trend, and I want the newest week furthest to the right. The field itself is not a date field, but made by this formule Yr Wk = YEAR (field) & " " & WEEKNUM(field). So I am guessing it is stored as text and not date. But still, I should be able to flip/invert the axis, right?

 

2 ACCEPTED SOLUTIONS
JoHo_BI
Responsive Resident
Responsive Resident

Understood! Then I would create a date table, set the relationship up and use the new date table column as the sort by. I believe that should work. 

View solution in original post

Alright, I'll try that. Thanks!

View solution in original post

8 REPLIES 8
JoHo_BI
Responsive Resident
Responsive Resident

Hi @Espen1515,

 

On the modelling tab at the top there is a 'Sort By' column option. If you select your calculated column, then sort it by date for example, you should be able to sort it using the 3 dots on the top right of the visualisation.

 

Hope that helps! 

Hi,

 

As my column is text, I cannot sort by date. I only get the option to sort by other columns.

If I am in the graph itself, I the "sort by" column is grey and I cannot select that.

 

Fields.png

JoHo_BI
Responsive Resident
Responsive Resident

Can you not use the 'sort by' option to sort it by the original date column you extract WEEKNUM and YEAR from? 

Hi,

 

When I try to sort by the column "tracestamp" (where I got my YEAR and WEEKNUM), I get the following message.

 

2018-05-22_14-20-27.png 

Here is my formula:

2018-05-22_14-19-33.png

 

 

JoHo_BI
Responsive Resident
Responsive Resident

Okay, sounds like a data cleansing issue. I've just managed to reproduce the steps and it works fine. Do you have duplicate dates in the timestamp column? Are they necessary? 

Yes there are definitely duplicates. The timestamp is the time that the data was imported, and I am counting how many fields there are each week. So in week 20, there would have been say 3200 duplicates, whereas in week 21 there would have been 3400 duplicates. I expect a slight increase each week.

JoHo_BI
Responsive Resident
Responsive Resident

Understood! Then I would create a date table, set the relationship up and use the new date table column as the sort by. I believe that should work. 

Alright, I'll try that. Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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