We can achieve this by using tableau grouping Group Your Data - Tableau.
Another way of grouping is to create a string calculated field ( Very useful link String Calculations in Tableau - Clearly and Simply )
Then you have to use this calculation with actual dimension in the view.
But visually representing the same you have to share the sample data with your requirement. So people might help you visually replicating the same.
Yes, to make that exact graph horizontal just press Ctrl-W.
If you want a horizontal stacked bar then you might need to re-arrange some tiles, but it should be very easy to do.