2

How can I sort days of week from right to left.

something like this:

enter image description here

This is what I have now:

enter image description here

I created column DayOfWeekSort but it gives me an error:

enter image description here

enter image description here

2
  • Does your model get refreshed daily or does this have to be done entirely dynamically? Commented May 19, 2020 at 23:30
  • it refreshes daily. Commented May 19, 2020 at 23:31

2 Answers 2

1

If you use TODAY() in a calculated column, it only updates whenever that column is recalculated (e.g. when the model is refreshed). Since you said your report is refreshed daily, this is good enough.

Try this:

DayOfWeekSort = MOD ( [Date] - TODAY (), 7 )

This gives 0 for today and increases up to a maximum of 6 and starts over.


As the error message says, you can't map, say, Tuesday to more than one value in a column to sort by, so the sorting column can't have more unique values than the column you are trying to sort.

Sign up to request clarification or add additional context in comments.

Comments

0

There is another way to sort the names of week days:

In the source table, add a new column by extracting the number of weekday from your date column. Then add another new column by extracting the name of the weekday from the same date column. Then sort the column with names by selecting the column and going the Modeling tab and selected column with day numbers from the Sort by Column.

The advice is originally taken from here: Order day names in a line chart in power Bi

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.