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 found a DAX code that works with direct query to group all of my values by day-of-the-week:
Solved! Go to Solution.
Hi @Anonymous ,
I have two ways to implement it.
1. Use the function of Format . Below is my formula of calculated column that you can have a try.
Column = FORMAT(financials[Date],"dddd")
2. Create a new group. This is based on the column that created by WEEKDAY.
Note : The data type of the column will be shown as text for the two ways.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So this is likely not the best way but what you could do is create a seperate column that gives a numeric value to all days of the week with Monday beign the lowest and Sunday the greatest. Then when you have the days of the week selected "sort by" the numeric column.
I thought about it long and hard, but I guess I'm not tracking how to accomplish this. Seems like this wouldn't be something that would need a work around. Assigning a numerical digit to represent a day is just dumb...
Hi @Anonymous ,
I have two ways to implement it.
1. Use the function of Format . Below is my formula of calculated column that you can have a try.
Column = FORMAT(financials[Date],"dddd")
2. Create a new group. This is based on the column that created by WEEKDAY.
Note : The data type of the column will be shown as text for the two ways.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for that response. I wound up creating the day-of-the-week field in SQL Server Management Studio and pushing the new table to PowerBI. There's a lot more information out there about how to do this in SQL. I have been very frustrated trying to implement this with code in PowerBI. Why would they not just use what coding language that's already established instead of going with DAX rather than Excel or TSQL! I hate having to unlearn how to create formulas. Plus many of the Dax formulas are designed to be incompatible with a direct query. The more I use PowerBI, the more I hate it. It's like a toy or a puzzle to solve more than it is a utility.
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 |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |