Forum Discussion
Sort Graph by Month and Year
Hi Polaris,
You could create a new column in your table in the query editor and input the order in which you wish to see the dates by creating an index e.g.
Jan 2018 = 1
Dec 2017 = 2
Nov 2017 = 3
Once you've done that then sort the graph via the index created. But i would advise creating the table oldest date to newest for ease of use.
- polaris30288 years agoHelper III
Hi Jordan,
Actually, the X-axis I used in this graph is from a Date table using the combined fields of month and year.
InsertCalendarMonth = Table.AddColumn(InsertMonthName, "MonthInCalendar", each (try(Text.Range([MonthName],0,3)) otherwise [MonthName]) & " " & Number.ToText([Year])),
Can you walk me through on how I can create a new column with index as suggested above?
Thanks
- JordanJSA8 years agoFrequent Visitor
Hi Polaris,
Okay, what source did you upload the data from? Excel?
- polaris30288 years agoHelper III
Hi Jordan - not sure what source of what data you're asking. The Date table was created in PowerBI itself (as a query). The data is coming from Google sheets.
So, basically I have two tables, one as datasource and a Date table for the calendar. The X-Axis presented in this graph that I wanted to sort out is using the concatenated Month and Year columns from the Date table. If I have to create a new column like what you said with Index, which table should I create it? and How?
Thanks
- juanahumada8 years agoFrequent Visitor
good solution, I could solved the same problem thank to your comment.