Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Newbie Question on Sorting Columns

Hello!

 

I have data set with weekday data with the date (say 2020-05-04), the day of the week, and the actual values over multiple weeks.

 

When I select clustered column chart, the chart is sorted in numeric descending order.

 

Is there a way that I could sort by the day of the week, please?

 

Thanks,

Erin

 

 

1 ACCEPTED SOLUTION

@Anonymous read this topic for sort by, you don't change anything on the visual, x-axis will still be the same, Week Name

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

10 REPLIES 10
parry2k
Super User
Super User

@Anonymous on your visual, top right corner click on 3 dots (...) and change the sort order and sort column from the menu there.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Great, thanks!

 

It is changing the sort to the day.  However, it's sorting in reverse alphabetical order.  Is there a way around that, please?  I have a feeling that it's something very simple.  Thanks!

 

 

@Anonymous you should change the sort order descending to ascending at the same place

 

image.png

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I did try that; it sorts in alphabetical order.  So Friday is first, then Monday, etc.

 

Is there a way to set up a function, maybe, that you can list the order of the items to sort by, please?

 

Thanks.

 

Yes you should add a day of week column in your table and sort day of week name by this column and that will take care if it. For sort by example, go to my website and under blog there is a blog on date dimension and that have sort by example. www.perytus.com/blog



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I do have a day column in the data.  Here is a sample of the fake data:

 

date day x
1 2020-05-04 Monday 12
2 2020-05-04 Monday 7
3 2020-05-04 Monday 6
4 2020-05-05 Tuesday 13
5 2020-05-05 Tuesday 5
6 2020-05-05 Tuesday 13
7 2020-05-06 Wednesday 1
8 2020-05-06 Wednesday 4
9 2020-05-06 Wednesday 10
10 2020-05-07 Thursday 1
11 2020-05-07 Thursday 14
12 2020-05-07 Thursday 9
13 2020-05-08 Friday 4
14 2020-05-08 Friday 10
15 2020-05-08 Friday 8
16 2020-05-11 Monday 9
17 2020-05-11 Monday 2
18 2020-05-11 Monday 15
19 2020-05-12 Tuesday 15
20 2020-05-12 Tuesday 4
21 2020-05-12 Tuesday 10
22 2020-05-13 Wednesday 10
23 2020-05-13 Wednesday 13
24 2020-05-13 Wednesday 12
25 2020-05-14 Thursday 2
26 2020-05-14 Thursday 14
27 2020-05-14 Thursday 10
28 2020-05-15 Friday 8
29 2020-05-15 Friday 8
30 2020-05-15 Friday 10
31 2020-05-18 Monday 1
32 2020-05-18 Monday 11
33 2020-05-18 Monday 1
34 2020-05-19 Tuesday 12
35 2020-05-19 Tuesday 6
36 2020-05-19 Tuesday 14
37 2020-05-20 Wednesday 9
38 2020-05-20 Wednesday 4
39 2020-05-20 Wednesday 9
40 2020-05-21 Thursday 7
41 2020-05-21 Thursday 7
42 2020-05-21 Thursday 11
43 2020-05-22 Friday 1
44 2020-05-22 Friday 11
45 2020-05-22 Friday 13

 

It seems to sort alphabetically.  If it's ascending, it starts with Friday and goes to Wednesday.  If descending, it starts with Wednesday and goes to Friday.

 

Should I create a column with 1 for Monday, 2 for Tuesday, and so on, please?

 

Thanks.  Sorry for all of the trouble.

 

 

@Anonymous yes you are on right track you can add weekday column by using following expression

 

Weekday Number = WEEKDAY ( DateTable[Date] )

 

select Day column and on the menu under column tools, sort it by weekday number column that created from the above expression and that will do it

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Great!

 

One last question, please.  So now I have the data sorted by Weekday number.  I would like the X axis labels to appear as the Alpha Date Name rather than the number.  How can I do that, please?

 

Thanks again.

 

 

@Anonymous read this topic for sort by, you don't change anything on the visual, x-axis will still be the same, Week Name

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

That is absolutely it!

 

Thanks so much!!!!!

 

Sincerely,

Erin

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.