Work Shift Order in Vertical Stacked Bar Chart

Good afternoon, as you can see in the following image, I have tomorrow’s shift in blue, which is fine.

Now in the following image the night shift follows me and then the late shift, as shown in the following two images:

That is to say, he is ordering my shifts as follows:
1- Tomorrow shift
2- Night shift
3- Late shift

I would like you to order them in the following way
1- Tomorrow shift (that’s fine)
2- Afternoon Shift
3- Night Shift

Now it is ordering them alphabetically, I think, is there any possibility of ordering this? thank you so much

Hi,

This is very simple. Just add new filed in you dataset and assigned number value to your shifts
like 1,2,3

1- Tomorrow shift (that’s fine)
2- Afternoon Shift
3- Night Shift

And order by your graph based on it. This will work.

Regards,
Naveed Ali

Hello, good day, we cannot modify the data set due to a request from the client, who wants those names for the shifts, is there any possibility or any tool through Quicksigh?

Hi @agustinmoncada94,
You can create a calculated field at the analysis level that could assist with this. Essentially, you would still be adding a number value to your shift options like Naveed mentioned but without tampering with the underlying dataset.

You can create a calculated field to assign a assign a number to each shift type:

ifelse(
WorkCalendarInterval Name = 'Turno manana', concat('1 - ', WorkCalendarInterval Name),
WorkCalendarInterval Name = 'Turno Tarde', concat('2 - ', WorkCalendarInterval Name),
WorkCalendarInterval Name = 'Turno Noche',concat('3 - ', WorkCalendarInterval Name)
)

Then you can use that calculated field to group by on the graph. If you want it to show in the tooltip without the number, you can change the field in tooltip of the visual.

I’ll mark this as a solution but let me know if you have any remaining questions.

Thank you!