Forum Discussion
DirectQuery: Sort Data by Week Day
- 9 years ago
Hi,
Thanks for your solution, it actually sent me in the right direction. My problem was simply that I assumed that the sort-order was at a table level and not a column level. I didn't realise that Microsoft Power BI allows you to set the sort orderat a column level.
My issue was actually caused because the "Sort By Colmn" option appeared grey-out, I was selecting the table name, rather than selecting the column that I wanted to apply the sort order on.
Kind Regards,
Tim
In your scenario, even in Direct Query mode, you can still create a WeekDay column with WEEKDAY() function.
WeekDay = WEEKDAY(Table[Date],2)
then just have your WeekDay Name column Sorted by WeekDay column.
See my sameple (Month Name sorted by Month Number) below:
Regards,
- Cazpian9 years agoNew Member
Hi,
Thanks for your solution, it actually sent me in the right direction. My problem was simply that I assumed that the sort-order was at a table level and not a column level. I didn't realise that Microsoft Power BI allows you to set the sort orderat a column level.
My issue was actually caused because the "Sort By Colmn" option appeared grey-out, I was selecting the table name, rather than selecting the column that I wanted to apply the sort order on.
Kind Regards,
Tim
- edejes28 years ago
Advocate IV
you can do this as well with the days, hope you like it https://www.youtube.com/watch?v=n_gnuFS8qoY&feature=youtu.be
- Anonymous5 years agoNot applicable
This is not working for Direct Query as Modeling tab disabled when staorage mode set to Direct Query
- Anonymous5 years agoNot applicable
This method worked for me with Direct Query. Sorting the column instead of entier table does the job. Thank you so much