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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Tempus-Tommy
New Member

Sorting Table with 2 Datasets

Hi,

 

Having trouble sorting the rows in a Table visual with 2 Datasets (related by Dataset1.Field1=Dataset2.Field1).

What I want to do is to sort first on Dataset1.Field2 and then on Dataset2.Field3, any ideas?

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hi @Tempus-Tommy ,

From your description, it seems that you want sort first on Dataset1.Field2 and then on Dataset2.Field3? If it is, You may refer to the post below

https://community.powerbi.com/t5/Desktop/Sorting-a-table-using-multiple-columns/td-p/447941

If it is not your case, please describe some detail for your problem and show some screenshoots about your issue, so that we can help further investigate on it.

Best Regards,

Liang

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

Hi V-lian-msft,

 

Thank you so much for replying on my issue. I think you get the problem correctly but the post you refer to is for sorting on multiple columns inside the same dataset/table.

I have Dataset1 with some Employee-data and Dataset2 with som Sales-data and a Date-column. But, Dataset2 do not contain the Employee-number so there is a relationship between theese 2 datasets.

Into a Table visual I drag the Dataset1.EmployeeID, Dataset2.Date and Dataset2.SalesAmount, and would like that the sorting of the rows in this Table visual is done first on Dataset1.EmployeeID and then on Dataset2.Date, but the sorting seems to be random. I have tried doing the sorting in the actual sql getting the data for each Dataset and also in Power Query. As long as I use 2 different Table visuals, one for each table the sorting is ok, but when I combine these into one Table visual it is messed up.

Hi @Tempus-Tommy ,

 

I understand your intention,you can refer to the post below

https://community.powerbi.com/t5/Desktop/Sorting-by-multiple-columns/m-p/535690 

 

Best Regards,

Liang

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

Thanks, but this is pretty much the same scenario as before since all the columns is in the same table/dataset.

Hi @Tempus-Tommy ,

 

What is the relationship between the two tables? What is the direction of "cross filter direction"?

 

Best Regards,

Liang 

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

Hi,

 

Cross Filter Direction is "Simple".

If I delete the Table Visual and add a new one and then drag the fields to to visual in the same order I want the sort to happen, then it seems to be ok. But not possible to change afterwards.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors