cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
susheel1347
Helper III
Helper III

WeekDay Sort on Column chart

Hi All,

I have the below sample data. When I created column chart with weekday on X-axis & Value on Y-axis. I am not able to order the weekday with actual day of the week order i.e monday, tuesday, wednesday....Holiday. I tried creating new column with switch DAX but its not working. I am getting below result on PBI.  Can you please help to sort?

 

Screenshot 2020-11-24 232801.png

 

WeekDayValue
Monday5
Friday4
Saturday3
Tuesday6
Wednesday1
Thursday8
Sunday9
Holiday2

 

Thanks

 
2 ACCEPTED SOLUTIONS
amitchandak
Super User IV
Super User IV

@susheel1347 , if you have date in table create a sort column

 

Weekday = weekday([date])

Weekday1  = weekday

weekday sort = Switch( True(),

[Weekday]= "Monday" ,1 ,

//Add others

8//default value

)

 

And sort weekday 1 on weekday sort

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

else create



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

amitchandak
Super User IV
Super User IV

@susheel1347 , Then refer to my second option

 

Weekday1 = weekday

weekday sort = Switch( True(),

[Weekday]= "Monday" ,1 ,

//Add others

8//default value

)

 

And sort weekday 1 on weekday sort https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column

 

 

Sortnewribbion.png

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

8 REPLIES 8
amitchandak
Super User IV
Super User IV

@susheel1347 , Then refer to my second option

 

Weekday1 = weekday

weekday sort = Switch( True(),

[Weekday]= "Monday" ,1 ,

//Add others

8//default value

)

 

And sort weekday 1 on weekday sort https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column

 

 

Sortnewribbion.png

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

@amitchandak - Thanks. It works.

amitchandak
Super User IV
Super User IV

@susheel1347 , if you have date in table create a sort column

 

Weekday = weekday([date])

Weekday1  = weekday

weekday sort = Switch( True(),

[Weekday]= "Monday" ,1 ,

//Add others

8//default value

)

 

And sort weekday 1 on weekday sort

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

else create



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

@amitchandak - I do not have a date column. I only have 2 columns weekday & value.

veenashenolikar
Helper V
Helper V

@susheel1347 ,

 

You need to sort the WeekDay column using Value column. There is a option to do so in Data View.

veenashenolikar_0-1606282917547.png

After that, sort your chart on Weekday.(Check descending/ascending as per your requirement)

veenashenolikar_1-1606283163108.png

 

 

Please mark this as a solution if it help you solve your issue.

Regards,

Veena Shenolikar

Hi @veenashenolikar 

I did that. But it did not work. Its is sorting weekday based on the value.

 

susheel1347_0-1606283764670.png

 

Hi @susheel1347 ,

 

You need to change the sorting of the chart from Values to Weekday column. Have you tried this?

veenashenolikar_0-1606286373448.png

 

Mark this as a solution if it helped solve your issue.

Veena Shenolikar

 

Hi @veenashenolikar -
Yes I tried the same way. But its not working. 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors