cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grkanth81 Frequent Visitor
Frequent Visitor

Sorting the data in the stacked column chart by Month Name

Hi All,

I am facing an issue with sorting the data in the Stacked column chart.

Please check the below screenshot. 

I would like the values inside the stacked bar chart to be sorted like July, August, September, October, November etc.... Any idea how to achieve this?

 

Thanks,

RavCapture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

Screenshot_7.png

Select the months column and in the modelling tab ,select sort by column.I hope this works for you.

 

Or you can also assign numbers to the months ,if the above doesn't work.

Month=SWITCH([MonthNumber],
1,"January",
2,"Feburary",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
12,"December",
"Invalid Month Number"

8 REPLIES 8
Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

hey ! kindly check the data type of your Months column ,if it is a string or date type .Maybe the data is not geting displayed in a chronological order.

grkanth81 Frequent Visitor
Frequent Visitor

Re: Sorting the data in the stacked column chart by Month Name

Hi Hardik,

 

The MonthName column is having a data type of Text.

Basically i have one column which has date values and as i created this new column MonthName from it using DAX

=FORMAT([InvoiceDate],"MMMM")

 

Thanks

Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

Screenshot_7.pngSelect the months column and in the modelling tab ,select sort by column.I hope this works for you.

 

Or you can also assign numbers to the months ,if the above doesn't work.

Month=SWITCH([MonthNumber],
1,"January",
2,"Feburary",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
12,"December",
"Invalid Month Number"

Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

Screenshot_7.png

Select the months column and in the modelling tab ,select sort by column.I hope this works for you.

 

Or you can also assign numbers to the months ,if the above doesn't work.

Month=SWITCH([MonthNumber],
1,"January",
2,"Feburary",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
12,"December",
"Invalid Month Number"

grkanth81 Frequent Visitor
Frequent Visitor

Re: Sorting the data in the stacked column chart by Month Name

Hi Hardik,

 

I already have another column which displays only Month Numbers. when i try use with this, it works perfectly fine, but i would like to display names of the months in the chart rather than numbers.

 

Thanks...Capture1.PNG

Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

You can format the month number column to the month name as you did for the invoice date column.

grkanth81 Frequent Visitor
Frequent Visitor

Re: Sorting the data in the stacked column chart by Month Name

Thanks Hardik.

Your first option worked now (going to data modelling and selecting the sort by column option). I was doing it wrong initially.

Its all fixed now.

 

Thanks

Hardik Established Member
Established Member

Re: Sorting the data in the stacked column chart by Month Name

@grkanth81 pleasure