Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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"
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
107 | |
70 | |
70 | |
43 |
User | Count |
---|---|
148 | |
104 | |
104 | |
89 | |
66 |