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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
stevedata
Frequent Visitor

Issuer sorting column created by union

I created a table using union and created a sort order

TotalRegionsorder = UNION(DISTINCT(Main[Region]),{"Global"})
 
RegionGlobalSortorder
US1
ZA2
Global3
 
In a matrix table first row is RegionGlobal and i want to sort using my sort order but it doesnt work,
It also doesnt work when i have RegionGlobal as a legend in a clusterd column chart and i try to sort by RegionGlobal
 
In my matrix chart when i replace RegionGlobal with Sortorder, only the first 2 rows apper in the table and Global dissappers
When i try and sort the RegionGlobal column by the sortider column i get a circular dfependancy error
A circular depoendancy was detected: Totalregionsorder[RegionGlobal], Totalregionsorder[Regionorder],Totalregionsorder[RegionGlobal].
 
 
Can anyone help? 
 
 
2 ACCEPTED SOLUTIONS

Hi @stevedata ,

Based on the above error , need to remove [RegionMEASURE0]) measure from the calculated column , because its wont supported.
Use this DAX : 

RegionOrder2 =
SWITCH(
    TRUE(),
    TotalRegionsorder[RegionGlobal] = "Global", 1,
    TotalRegionsorder[RegionGlobal] = "US", 2,
    TotalRegionsorder[RegionGlobal] = "ZA", 3,
    999  -- default fallback numeric value
)


expected output :

vaatheeque_0-1747989379708.png

Hope this helps !

If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

Thanks for using Microsoft Fabric Community Forum.



 

View solution in original post

Hi @stevedata ,


Have you resolved the issue? If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

View solution in original post

7 REPLIES 7
Kishore_KVN
Super User
Super User

Hello @stevedata, is it possible for you to share any sample pbix?

 

Thanks,

Kishore

Hi @stevedata ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Hi @stevedata ,

If the information is helpful, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.

We value your feedback, and it will help us to assist others who might have a similar query. Thank you for your contribution in enhancing Microsoft Fabric Community Forum.

 

Hi @stevedata ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Still no solution found im afraid.

 

I tried create a SWITCH column to assign order below - but when I try and sort the RegionGlobal column I still get the circular dependancy issue.

 

RegionOrder2 = SWITCH(
TRUE(),
TotalRegionsorder[RegionGlobal] = "Global", 1,
TotalRegionsorder[RegionGlobal] = "US",2,
TotalRegionsorder[RegionGlobal] = "ZA",3,
[RegionMEASURE0])

 

error i then get: 

A circular dependancy was detected: Totalregionsorder[RegionGlobal], Totalregionsorder[Regionorder2],Totalregionsorder[RegionGlobal].

Hi @stevedata ,

Based on the above error , need to remove [RegionMEASURE0]) measure from the calculated column , because its wont supported.
Use this DAX : 

RegionOrder2 =
SWITCH(
    TRUE(),
    TotalRegionsorder[RegionGlobal] = "Global", 1,
    TotalRegionsorder[RegionGlobal] = "US", 2,
    TotalRegionsorder[RegionGlobal] = "ZA", 3,
    999  -- default fallback numeric value
)


expected output :

vaatheeque_0-1747989379708.png

Hope this helps !

If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

Thanks for using Microsoft Fabric Community Forum.



 

Hi @stevedata ,


Have you resolved the issue? If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.