Forum Discussion
custom column with switch statement
- 8 years ago
Then the Switch statement that you mentioned is working perfect right?
In this case as well, create two columns
Name of Day
= SWITCH(
WEEKDAY(table[Date],2),
1,"Monday",
2,"Tuesday",
3,"Wednesday",
4,"Thursday",
5,"Friday",
6,"Saturday",
7,"Sunday")and
Day of Week = WEEKDAY(table[Date],2)
Then use Sort by column option as suggested before.
anithat thanks for your suggestion. The database is very huge and the refresh time now takes about 20-30 mins. I reckon adding one more column will add up the load.
Is there any way I can use the switch statement in power query?
I will test the refresh time for both as well.
Then the Switch statement that you mentioned is working perfect right?
In this case as well, create two columns
Name of Day
= SWITCH(
WEEKDAY(table[Date],2),
1,"Monday",
2,"Tuesday",
3,"Wednesday",
4,"Thursday",
5,"Friday",
6,"Saturday",
7,"Sunday")
and
Day of Week = WEEKDAY(table[Date],2)
Then use Sort by column option as suggested before.