# How to sort by multiple parameters using Blueprints?

**URL:** <https://forums.unrealengine.com/t/how-to-sort-by-multiple-parameters-using-blueprints/2660401>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [September 27, 2025, 12:40pm UTC](https://forums.unrealengine.com/t/how-to-sort-by-multiple-parameters-using-blueprints/2660401 "2025-09-27T12:40:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nortksi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nortksi](https://forums.unrealengine.com/u/Nortksi)\
**Post date:** [September 27, 2025, 12:40pm UTC](https://forums.unrealengine.com/t/how-to-sort-by-multiple-parameters-using-blueprints/2660401/1 "2025-09-27T12:40:53Z")

</div>

After following the excellent sorting thread by @Supremative [Sorting algorithms in Blueprints](https://forums.unrealengine.com/t/sorting-algorithms-in-blueprints/1135992)

I am using a simple bubble sort to arrange soccer league tables by points in descending order. However; teams that have the same number of points then need to be sorted by a goal difference parameter. How do I modify my blueprint to accomplish this?

 ![sort](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/2/fb2b648402f9d245dad94548b3e47afbfaae264f.jpeg)

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [September 27, 2025, 1:37pm UTC](https://forums.unrealengine.com/t/how-to-sort-by-multiple-parameters-using-blueprints/2660401/2 "2025-09-27T13:37:24Z")

</div>

Try adding a condition to the swap: (A.x \< B.x) OR ((A.x == B.x) AND (A.y \< B.y))
