I currently have 30 minute time slots, ranging from 08:00 to 20:00.
My data set is a series of rows that countain information of when a collection and the respective delivery happened within these time slots.
I would like to display this information in a bar chart, representing the ammount of times a pickup or delivery occured in that time slot.
My first question is if it would be possible to only represent this using just 1 chart and being able to distinguish them by color, similar. From my understanding this seems to be impossible, which leads me to my second approach/problem:
I thought of creating 2 separate charts, one regarding the pickup time slots and the other representing the delivery time slots, and the stack them on top of each other. However, I am not able to limit the X Axis range and one chart is starting at 08:00, while the other is starting at 07:00 (no idea why, since it is impossible for that time slot to have any records)
They both have a 24 bar limit. Also, there are over 40 records for the 20:00 time slot, but looker for some reason prefers to display the empty 07:00 time slot instead of the 20:00 .
Solved! Go to Solution.
So, I'm not sure how to fix the X-axis issue. But, I think I can help you get this into a single chart!
This is a little involved, so bear with me. We're basically going to create a base table of time slots, and then join your data to it twice - once on pickup time and once on delivery time. Then the two counts from these two "tables" will be the pickup and delivery counts you're looking for.
Step 1: Create a new Base Slots data source that has all possible slots for pickup or delivery. I just put some slots down in Google Sheets and connected that.
Step 2: Blend the original data source to the base slots data source twice. The way I did it was starting from the original data source as "pickups", then right joining that to the base slots on pickup slot == base slot. Then, I left joined the original data source, this time as "deliveries", on base slot == delivery slot.
Step 3: Create a bar chart with the base slots as the dimension, and both record counts as the metrics. One record count will represent pickups, and the other deliveries.
I hope this helps! Sorry it's kind of long and convoluted!
So, I'm not sure how to fix the X-axis issue. But, I think I can help you get this into a single chart!
This is a little involved, so bear with me. We're basically going to create a base table of time slots, and then join your data to it twice - once on pickup time and once on delivery time. Then the two counts from these two "tables" will be the pickup and delivery counts you're looking for.
Step 1: Create a new Base Slots data source that has all possible slots for pickup or delivery. I just put some slots down in Google Sheets and connected that.
Step 2: Blend the original data source to the base slots data source twice. The way I did it was starting from the original data source as "pickups", then right joining that to the base slots on pickup slot == base slot. Then, I left joined the original data source, this time as "deliveries", on base slot == delivery slot.
Step 3: Create a bar chart with the base slots as the dimension, and both record counts as the metrics. One record count will represent pickups, and the other deliveries.
I hope this helps! Sorry it's kind of long and convoluted!