Forum Discussion
To have data sorted the same, in Data view, as it's in Editor
A data structure as below.
(the .pbix file is here: https://we.tl/t-l4vagf7oXc )
I need the data in Data view to be sorted by “Project” and “Attend Date” (first date then time), to suit some formula.
Steps taken in Advanced Editor:
(the column “Attend Date” is texts)
- Duplicated the column “Attend Date”, and split it by delimiters, to create 2 new columns – “Attend Date (mm/dd/e)” and “Attend Date (time)”.
- The data was sorted by 1. “Project”, 2. “Attend Date (mm/dd/e)”, 3. “Attend Date (time)”.
- Then, an index column starting from 1, was added to the data.
In Advanced Editor, it looks like the data is sorted by the Index column (1,2,3,4,5…) which was by “Project” and “Attend Date” (first date then time).
When Closed and Applied, however it is not the same sorting in Data view.
As there are some formula requires the data sorted. How can I sort the data in Data view, by “Project” and “Attend Date” (first date then time). Thank you.
Hi JohnnyK
You can sort by index column as:
When you drag the fields into visuals, you can set as:
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
2 Replies
- lbendlin
Super User
Neither of these are important. The only important place is the Power BI visual. In a table visual you can sort multiple columns by first sorting on the first column and then shift-click the second column.
How To Sort A Table Using Multiple Columns In Power BI (c-sharpcorner.com)
- v-xulin-mstf
Community Support
Hi JohnnyK
You can sort by index column as:
When you drag the fields into visuals, you can set as:
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!