Forum Discussion
How to sort weeknumber in row?
- 8 years ago
I found that I can sort it in the report after I submitted to the web. just go to that visualization at right corner and select sort by weeknumber then done. it's not working in desktop.
thank you everyone.
Hey ericbi!
I put your data into an Excel sheet--not power pivot. I then imported the excel sheet into power bi. I then created a matrix with the info, and it appeared as follows by default:
Click HERE if you need to access my .pbix file.
Hi,
I would like to have the 201803 in the first column, then 201802... etc.
- Anonymous8 years agoNot applicable
ericbi,
Please follow the steps below.
1. Create a conditional column in Query Editor of Power BI Desktop.
2. In report view of Power BI Desktop, click the Week column in your tables, then choose "Sort by column" to sort the Week column by the Custom column(conditional column).
Regards,
Lydia- ericbi8 years agoFrequent Visitor
Thank you Lydia. but my report has scheduled refresh, so the weeknumber will be added automatically, I would like to find a way to sort it by itself.
thanks again.
- Anonymous8 years agoNot applicable
Credits to @ipsingh79 in an earlier forum post. I checked his solution and that works:
Please check if all weeks are correctly filled like 201801, 201818, etc. This must be correct to let the solution work.
Open Edit Query --> Add custom column as : SortWeek = 999953 - [Week]
Apply and Close the query editor
Sort the original Week column with the custom column "SortWeek"
Matrix will be correctly sorted (201803 as first column)