Forum Discussion

Srishti's avatar
Srishti
New Member
3 years ago
Solved

Power bi

Hi, my question is I’m unable to sort this as per days week. The slicer is not in order.what to do

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Srishti ,

    There is no direct option to sort week day, try to sort manually by the following way-

    1. Create a calculated column and write the below DAXWeekDay Sort = SWITCH(Table1[WeekDay],"Monday",01,"Tuesday",02,"Wednesday",03,"Thursday",04,"Friday",05,"Saturday",06,"Sunday",07,08)
    2. Sort "WeekDay Name" column by "WeekDay Sort" Column under the Modeling tab in ribbon palet.

     

    I have also found a similar post, please refer to it to see if it helps you.

    Solved: Ordering weekdays. Monday, Tuesday, Wednesday, Thu... - Microsoft Power BI Community

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Srishti , You need to create a sort column

     

    hope you have date in table

    weekday = weekday([date],1)

     

    mark this column as sort column of weekday wise name

     

    If you want write a Switch

     

    Week day name 1= [Weekdat name]

     

    weekday sort =

    Switch( [Weekday Name],

    "Sunday",1,

    "Monday",2

    //Add others

    )

     

    Then mark weekday sort as sort column of Week day name 1(select that and use column tools)

     

    How to Create Sort Column and Solve Related Errors:
    https://www.youtube.com/watch?v=KK1zu4MBb-c

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Srishti ,

    There is no direct option to sort week day, try to sort manually by the following way-

    1. Create a calculated column and write the below DAXWeekDay Sort = SWITCH(Table1[WeekDay],"Monday",01,"Tuesday",02,"Wednesday",03,"Thursday",04,"Friday",05,"Saturday",06,"Sunday",07,08)
    2. Sort "WeekDay Name" column by "WeekDay Sort" Column under the Modeling tab in ribbon palet.

     

    I have also found a similar post, please refer to it to see if it helps you.

    Solved: Ordering weekdays. Monday, Tuesday, Wednesday, Thu... - Microsoft Power BI Community

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.