Sort vertical bar chart comparing the month of the previous year

I have a vertical bar chart with a date range on the x-axis and a billing figure in the value field. To get specific months of each year, I’m using parameters. I want to know how I can sort the chart so it compares a month with the previous year? since it currently orders it chronologically

thank you so much

Hi @winlike,
If you’d like to just set them up in order, you could try changing the text that gets displayed for your field using the switch function and using a numbering system like ‘01., 02., etc.’. That will allow them to be sorted alphabetically and should sort them together.
I would suggest going about it a different way though; I would suggest creating a calculated field to group the billing figure by year, that way you can use both of the year fields in the value well of your visual, which will show the months for each year side by side.

Let me know if you have any additional questions.

1 Like

Hi @winlike ,
if you want to keep the labels as they are, you can create a calculated field defining the order you need, then you can sort the graph using a hidden field. In this way the values and the labels will remain the same, but you will have the desired sorting.

Let us know if this solve your issue :slight_smile:

Best regards,
Andrea

1 Like

Thanks for the answer have a nice day