Forum Discussion
Day Sort on Bar Chart
I need to sort the X axis columns by the days of the Week: "MON", "TUES", etc. I was actually able to do this with one of my tables using an index column. I have another table with the exact same format and it won't sort by the index. I tried creating a lookup table with day and index and joined by the day field. I also have a date value that I can use but everything I try sorts the bars alphabetically.
It is really quite simple? Bar1 = MON, Bar 2 = TUES, Bar3 = WED etc.
When I used dates August3, August4, etc. it sorted it as August3, August5, August7 etc. I set the sort column in the Modeling ribbon but it still sorts illogically.
- Anonymous6 years ago
The solution was to join the subsequent tables onto the existing tables. The visual required several orgs to sit together in bar chart format. The source data had the orgs on a single spreadsheet. To get the required look, I read in the source file 7 times and shaped and transformed the data. With the first Org I was able to add an index column and sort it. Did the same thing for the subsequent tables but they would not sort on the index column. I then joined the subsequent tables to the original table and used the Day column from the original in all of the bar charts. Not intutive but it worked.
5 Replies
- mhossain
Solution Sage
Hi Anonymous
Can you create a mapping table where you have just days (Mon,Tue, Wed........) in one column and second column Sort numbers (1,2,3,4,5,6,7)
Create relationship with your main table, bring mapping table day column in the X axis and Sort by column sort, hope this makes sense.
- AnonymousNot applicable
Thank You Mhossain. Amazingly, I can do this with one table without joining to a lookup table. I use an Index column and choose it as the sort column and it works as desired. However, if I try the same thing with a different Org (same source data) it doesn't sort. Could be a mental block but I have tried this with a lookup table and other ideas. It really should be very simple, 3 columns: 1) an Org name, 2) Day of the week and Employee Count as the measure.
Would like to share a screen shot but I think my department is blocking.
- AnonymousNot applicable
Suprisingly the Index values are showing as a row headers: 1 2 3 4 5 on the table that doesn't work and as a values in an Index column in the Table that does work.