This sounds incredibly straight forward but it's hard to tell without the data you're using.
Can you please start by providing a Tableau Packaged Workbook with some sample data?
thanks for your help, the file is attached. There is one additional variable called id.
The following is revised question:
I would like to plot the histogram for the average sales (by month, as there are many same months) by each id for each segment (segment is a category here). Also ids in different department are different. Ideally if we can put these histograms side by side across the segments.
problem.xlsx 7.6 KB