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.
I recently switched from import mode to directquery, but the format function no longer works.
Below is the format I used to use in the import mode, that I can get ex: Mon, Tues, Wed, ....
Solved! Go to Solution.
hi @Anonymous
Since FORMAT Function is not supported in directquery.
You could use SWITCH Function to create a column as below:
Day Name = SWITCH( WEEKDAY('Date'[By Date],2),
1,"Mon",
2,"Tue",
3,"Wed",
4,"Thu",
5,"Fri",
6,"Sat",
7,"Sun")
Regards,
Lin
Columns are not allowed, you can have measure but the display would depend on context
Day Name = FORMAT(max('Date'[By Date]), "ddd")
Thanks. I'd need it in columns, because I want display each date in the column with its day name.
I'll instead achieve this in a SQL query then. In the meanwhile, can PBI add this feature in the DirectQuery mode?
Thanks.
hi @Anonymous
Since FORMAT Function is not supported in directquery.
You could use SWITCH Function to create a column as below:
Day Name = SWITCH( WEEKDAY('Date'[By Date],2),
1,"Mon",
2,"Tue",
3,"Wed",
4,"Thu",
5,"Fri",
6,"Sat",
7,"Sun")
Regards,
Lin
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 |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |