Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
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.
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.
User | Count |
---|---|
84 | |
79 | |
69 | |
46 | |
43 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
39 |