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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
NareshSunder
New Member

Table visualization ordering

I have a table visualization with data from different sematic models. The data is all about parent and child items and I want it to be ordered in a hierarchy as shown in the screen shot. Any help would be appreciated.

NareshSunder_0-1750057816892.png

 

1 ACCEPTED SOLUTION
v-hjannapu
Community Support
Community Support

Hi @NareshSunder,

Thank you  for reaching out to the Microsoft fabric community forum.

To fix your issue you will need to create a custom column that follows your item hierarchy. Once you sort the table using that column, it will show in the correct structure.

Path = 
SWITCH(
    TRUE(),
    'ItemHierarchy'[Item] = "A", "1",
    'ItemHierarchy'[Item] = "A1", "1.1",
    'ItemHierarchy'[Item] = "A11", "1.1.1",
    'ItemHierarchy'[Item] = "A12", "1.1.2",
    'ItemHierarchy'[Item] = "A111", "1.1.1.1",
    'ItemHierarchy'[Item] = "A112", "1.1.1.2",
    'ItemHierarchy'[Item] = "A121", "1.1.2.1",
    'ItemHierarchy'[Item] = "A122", "1.1.2.2",
    'ItemHierarchy'[Item] = "A113", "1.1.1.1.1",
    "9"  // fallback/default
)

I tested it with my sample data, and it worked fine. Please find the attached screenshot and pbix for your reference.

vhjannapu_0-1750069430424.png

If this answer was helpful and pointed you in the right direction, please consider accepting it as solution and kindly give a kudos it will benefit other community members in the community. If you have any further questions, feel free to let us know.
Regards,
Harshitha.

View solution in original post

4 REPLIES 4
v-hjannapu
Community Support
Community Support

Hi @NareshSunder,

Thank you  for reaching out to the Microsoft fabric community forum.

To fix your issue you will need to create a custom column that follows your item hierarchy. Once you sort the table using that column, it will show in the correct structure.

Path = 
SWITCH(
    TRUE(),
    'ItemHierarchy'[Item] = "A", "1",
    'ItemHierarchy'[Item] = "A1", "1.1",
    'ItemHierarchy'[Item] = "A11", "1.1.1",
    'ItemHierarchy'[Item] = "A12", "1.1.2",
    'ItemHierarchy'[Item] = "A111", "1.1.1.1",
    'ItemHierarchy'[Item] = "A112", "1.1.1.2",
    'ItemHierarchy'[Item] = "A121", "1.1.2.1",
    'ItemHierarchy'[Item] = "A122", "1.1.2.2",
    'ItemHierarchy'[Item] = "A113", "1.1.1.1.1",
    "9"  // fallback/default
)

I tested it with my sample data, and it worked fine. Please find the attached screenshot and pbix for your reference.

vhjannapu_0-1750069430424.png

If this answer was helpful and pointed you in the right direction, please consider accepting it as solution and kindly give a kudos it will benefit other community members in the community. If you have any further questions, feel free to let us know.
Regards,
Harshitha.

Hi @NareshSunder,

Just wanted to check if you had the opportunity to review the suggestion provided?

If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

 

Thank You.

Hi @NareshSunder,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.


Thank you.

Hi @NareshSunder,

May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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