Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
DirectQuery mode;
I use Weekday(table(date_column)) formula to get the weekday number: 1,2,3,...
How can I get the weekday name? i.e. Monday, Tuesday, Wednesday,...
Many thanks!
Solved! Go to Solution.
Measure =
VAR
myNumber = table[date_col]
RETURN
SWITCH(
myNumber ,
1 , "Monday" ,
2 , "Tuesday" ,
3 , "Wednesday" ,
4 , "Thursday" ,
5 , "Friday" ,
6 , "Saturday" ,
"Sunday"
)
Or just try
Weekday = format(table[date_column],"DDDD")
the format() formular cannot be used in DirectQuery model....
Thanks anyway!
My data source is Azure SQL DB, fyi.
Thanks!
That's the last solution if i cannot make it in PBI lol.
Thanks!!!
Measure =
VAR
myNumber = table[date_col]
RETURN
SWITCH(
myNumber ,
1 , "Monday" ,
2 , "Tuesday" ,
3 , "Wednesday" ,
4 , "Thursday" ,
5 , "Friday" ,
6 , "Saturday" ,
"Sunday"
)
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |