Forum Discussion
Day Sort on Bar Chart
- 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.
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.
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.
- Anonymous6 years agoNot 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.
- mahoneypat6 years agoMicrosoft Employee
Please see this link on using the Sort By Column feature. If not already, you can add a column that has weekday # for each date (with WEEKDAY() function), and you can use that column as the Sort By Column for the day name column.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years agoNot applicable
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.