How to Order Bar Chart by Bars in a Specific Order

Hi everyone,

I will like to order my bar chart from a table based on the business process. Metabase automatically orders stacks in an alphabetical order from left to right. I would rather want to specify the order to reflect the business process instead of the default alphabetical order.

Please how do I achieve this? Thank you.

Hi @Uforo
That's currently not possible in the GUI (unless you prepend your business processes with numbers):
https://github.com/metabase/metabase/issues/2339 - upvote by clicking :+1: on the first post

You would have to use SQL to have full control.

Thank you Flamber.

Please could you walk me through how I could achieve this using numbers or SQL?

@Uforo Give you business process numbers, so instead of "Some" and "Group", they would be "1 Some" and "2 Group".

If you do your query in SQL, then no ordering is done (unless you add it).
You can convert a GUI question to SQL and remove the ORDER BY ... line
https://www.metabase.com/docs/latest/users-guide/04-asking-questions.html#viewing-the-sql-that-powers-your-question

1 Like

Thank you