Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have just one table and that contains a column sixe with sixes as- 2,8,4,6,M,L, 3XL etc. I need to sort them. For this I created a new coloum called sortOrder and used an If condition-
But, it gives me below error( Blue is Table name-
How can I sort sizes in the form 0,2,4,6,8..S,M,L,Xl.2Xl...so on?
Solved! Go to Solution.
Do it like this
refer: How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Size (Apparel) 1 = [Size (Apparel)]
SortOrder = IF(Table[Size (Apparel)]="2",1,IF(Table[Size (Apparel)]="4",2,IF(Table[Size (Apparel)]="6",3,IF(Table[Size (Apparel)]="8",4,IF(Table[Size (Apparel)]="10",5,
//other
(Apparel)]+38))))))
then
sort : Size (Apparel) 1 on SortOrder
That will not give a circular error
Do it like this
refer: How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Size (Apparel) 1 = [Size (Apparel)]
SortOrder = IF(Table[Size (Apparel)]="2",1,IF(Table[Size (Apparel)]="4",2,IF(Table[Size (Apparel)]="6",3,IF(Table[Size (Apparel)]="8",4,IF(Table[Size (Apparel)]="10",5,
//other
(Apparel)]+38))))))
then
sort : Size (Apparel) 1 on SortOrder
That will not give a circular error
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |