Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
AnushaH
Frequent Visitor

How to sort date column based on each group

Screenshot (3).png

I need similar to above shown table format in power bi

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @AnushaH ,

 

Here's my solution.

1.Group by the Key column and select All Rows in the Opreation.

vstephenmsft_0-1649756090609.png

vstephenmsft_1-1649756117860.png

 

2.Add a custom column to sort.

vstephenmsft_2-1649756148167.png

vstephenmsft_3-1649756158168.png

 

3.Expand the new custom column and remove the unneeded column.

vstephenmsft_4-1649756186342.png

vstephenmsft_5-1649756193588.png

vstephenmsft_6-1649756198035.png

 

You can check more details from my attachment.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

5 REPLIES 5
v-stephen-msft
Community Support
Community Support

Hi @AnushaH ,

 

Here's my solution.

1.Group by the Key column and select All Rows in the Opreation.

vstephenmsft_0-1649756090609.png

vstephenmsft_1-1649756117860.png

 

2.Add a custom column to sort.

vstephenmsft_2-1649756148167.png

vstephenmsft_3-1649756158168.png

 

3.Expand the new custom column and remove the unneeded column.

vstephenmsft_4-1649756186342.png

vstephenmsft_5-1649756193588.png

vstephenmsft_6-1649756198035.png

 

You can check more details from my attachment.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

MM159159
Frequent Visitor

In the Power Query select the drop down arrows on the top of the columns and sort asc or desc, when you sort several rows in order it will remember the sort order (by this then that etc). You will see a little 1, 2, 3 on the column headers specifying which order they have been sorted in;

 

MM159159_0-1649223258337.png

Is this what your after?

 

Microsoft Link: https://support.microsoft.com/en-us/office/sort-data-power-query-baf200d5-1097-49cf-80b3-f1ce07b5f11...

I want to order the period column  within the group in asc

amitchandak
Super User
Super User

@AnushaH , if this a table visual , first sort on Group using click/s, then press shift and click on date

 

on matrix it is not possible

I want to get the table in such format in data view /table in power query not in table visual

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.