Hey friends,
Does anyone know if there is a way to custom sort a bar chart? We want to sort our packages by day of week (Tuesday, Wednesday, etc) and then by time on Saturday and Sunday (matinee and then evening). I know we could put a numerical in front of each package (1 2020-21 Broadway Tuesday Eve, 2 2020-21 Broadway Wednesday Eve, etc) but we were hoping we could just sort the bar chart.
- Chris
Hi Chris!
There isn't a simple Package sort like there is for Production Seasons in the form of [Production Season Opening Date], however, this is completely doable.
Create a value for the first performance in each package, and sort on that. In order to accommodate your needs around matinee and evening sorting, we'll also need to include the hour of that first performance in the sort value. I might start with something like this, where each of the following [Calendar...] fields is coming from the PERFORMANCE DATE dimension, while the [Performance Hour] comes from the PERFORMANCE DETAIL dimension:
MIN ( [Calendar Year] *1000000 + [Calendar Month] *10000 + [Calendar Day Of Month] *100 + [Performance Hour] )
The only thing I don't like about this is that it's a really big number that's very visible in a pivot widget, so I lean toward doing this instead:
MIN ( [Calendar Year] *0.0001 + [Calendar Month] *0.000001 + [Calendar Day Of Month] *0.00000001 + [Performance Hour] *0.0000000001 )
Then rename it to something like "." (just a period), and set the number formatting for the value to be 0 decimal places, and then sort on it. You can make the column very narrow and very unobtrusive.
For a bar chart then... include this as the first (top) value in the Values area. Set the color to white. And then from the options menu for that value, set the Series Type to Line. This will then render that value as an invisible white line, behind the other column(s) of the chart, and still allow you to sort by that value.
PackageSort.dash
That's awesome, Chris Wallingford! I was also looking into if we could custom sort Month Name so that the months show in order of our fiscal year (beginning Oct. 1). Any suggestions on how I could do that?
Hi Rachel,
Yes, using the Fiscal Period field from the same Date Dimension of the Calendar Month Name as the sort value.
Cheers
Chris - I'm trying to help Rachel out with this. I tried to use the Fiscal Period from the same Date Dimension of the Calendar Month Name field that Rachel's Column Chart uses, but there's no option for sorting by the Fiscal Period that I can find. Here's what she's trying to do: Thanks!
Hi Jerry,For this particular example, using a Break by field, only a single Value is supported. Therefor, would you try adding Fiscal Period from the same Date Dimension in Categories, above Calendar Month Sort... at which point you can probably swap that out for regular ol' Calendar Month if you like.
Thank you, Chris Wallingford! I think I've got it showing in the right order now, but showing only the number for the month. Is this the correct setup for the Categories?
My bad, Rachel. I should have said "Calendar Month Name instead of Calendar Month Sort". Instead I just said "Calendar Month".
Hey Chris, sorry for the delay. We had an upgrade take place yesterday so I was not able to get into Analytics. Now it looks about right!
Thank you, again!