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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
joshua1990
Post Prodigy
Post Prodigy

Sequence column based on Day of Week

Hi all!

I have a table that has a column with the day of the week: Monday, Tuesday...

Now I would like add a column with a number to be able to order this column in the right sequence.

But I always get an error that this is not possible since there a independencies between both columns.

How can I add a sequence column to be able to order the column?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@joshua1990 , oh I see. Try this Calculated Column:

DayOfWeekSequence = 
    SWITCH('YourTable'[TextColumn],
        "Monday", 1,
        "Tuesday", 2,
        "Wednesday", 3,
        "Thursday", 4,
        "Friday", 5
        "Saturday", 6,
        "Sunday", 7
    )

Then set the Sort by Column option for 'YourTable'[TextColumn] to sort by the DayOfWeekSequence column.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@joshua1990 , use the DAX function WEEKDAY.

@Anonymous : This works just with Date columns

Anonymous
Not applicable

@joshua1990 , try this for your Calculated Column:

DayOfWeekSequence = WEEKDAY('dimDate'[Date])

In my Date table, it gives me this result:

EylesIT_0-1661337907331.png

I can then select the DayOfWeekSequence column to sort the DayOfWeek column:

EylesIT_1-1661338151827.png

 

 

Is this what you are looking for?

Hi, as mentioned I dont have a Date column

I have a text column that contains the day of the week, thats it.

Anonymous
Not applicable

@joshua1990 , oh I see. Try this Calculated Column:

DayOfWeekSequence = 
    SWITCH('YourTable'[TextColumn],
        "Monday", 1,
        "Tuesday", 2,
        "Wednesday", 3,
        "Thursday", 4,
        "Friday", 5
        "Saturday", 6,
        "Sunday", 7
    )

Then set the Sort by Column option for 'YourTable'[TextColumn] to sort by the DayOfWeekSequence column.

Anonymous
Not applicable

@joshua1990 , did my solution work for you?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.