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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Hierarchy from a single table

I have a table that looks like this:

 

AreaIDNameLevelParentAreaID
3469E6BB-5726-4361-9446-D9CA033323A5Addington355488524-7C1A-444A-AAE8-1D84EED6CD27
A029A676-7C80-4919-BCD1-5904DEA1605DAdelaide2995B428B-4AAE-4A07-9CD6-188CE3696903
694F16BD-7B44-4BAF-89D6-019C7926D262Adelaide3A029A676-7C80-4919-BCD1-5904DEA1605D
A91D890D-435A-44AF-8916-A30CDAF6154CAlbany312A1CFD8-508F-4E30-A034-27E77D0C3BD8
6722DCBC-FE77-460C-B943-390AA320CD81Artarmon3F1127466-E559-4B6F-8656-17D6CDA84645
12A1CFD8-508F-4E30-A034-27E77D0C3BD8Auckland2F677DCE9-E253-4ABD-9F4B-C2BA77237C76
CC2A6033-FDCB-4782-8A21-457C0B0FD159Auckland Central312A1CFD8-508F-4E30-A034-27E77D0C3BD8
4462D8BE-EC70-44EE-9546-84C6171C58DEAustralia0 
A8CD3BCC-3C26-40F3-9C07-9287A4E12FF0Bankstown3F1127466-E559-4B6F-8656-17D6CDA84645
17AC679A-6ABC-4B31-AD2E-9DEC5525DDE8Bass Hill3F1127466-E559-4B6F-8656-17D6CDA84645
275E35C7-BC25-4864-89CC-D9D6E82C29E2Belmont312A1CFD8-508F-4E30-A034-27E77D0C3BD8
C4443444-EB21-4C9F-A4FF-B5E6150DBAD6Belrose3F1127466-E559-4B6F-8656-17D6CDA84645
E9ABB3DD-09BA-46A8-880D-DF37C595DBA3Beverley Park3F1127466-E559-4B6F-8656-17D6CDA84645
C25F9DB5-54BE-464F-932B-6E7BB85FCD17Birkenhead312A1CFD8-508F-4E30-A034-27E77D0C3BD8
9FC4BEF2-B19F-4BDB-B653-84D48A484C0CBlakehurst3F1127466-E559-4B6F-8656-17D6CDA84645
1FDD067D-45DD-4546-9AE2-3D39E61E82ABBondi Junction3F1127466-E559-4B6F-8656-17D6CDA84645
97261326-685F-41A1-83DD-DE1756D19AD3Brisbane2BEF15D60-6DC8-4F90-AAE1-01A4D1729F80
E95CF910-63C1-4607-85BC-2852341E4BB0Brisbane397261326-685F-41A1-83DD-DE1756D19AD3
ACCE996F-E627-4742-B564-1750445993A5Bucklands Beach312A1CFD8-508F-4E30-A034-27E77D0C3BD8
9560CD37-8595-4832-B02F-F4971AC78D26Buranda397261326-685F-41A1-83DD-DE1756D19AD3
487EC2D5-AF20-446D-973F-7965BDE4361CBurnside355488524-7C1A-444A-AAE8-1D84EED6CD27

 

One "Area" table with suburbs, cities, states and countries, all related to eachother by a parentID. I'd like to use the custom visual Heirachy Slicer https://app.powerbi.com/visuals/show/HierarchySlicer1458836712039 but I can't figure out a way to do this....

 

I have tried to create in the Query Editor 4 separate tables, each filtering on each level so there is a different query for suburbs, cities, states and countries but there are too many relationships between all the tables and it breaks...

 

Can I create 4measures and call it "Country, Suburb, City, State" and traverse up the relationship tree and populate these for the slicer? Any hints as to what the DAX query would be?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

You can add hierarchy column to this table and drag this new column to hierarchy slicer:

 

Capture.PNG

 

Capture2.PNG

 

Capture3.PNG

 

Capture4.PNG

 

 

 

Regards,

Xiaoxin Sheng 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

You can add hierarchy column to this table and drag this new column to hierarchy slicer:

 

Capture.PNG

 

Capture2.PNG

 

Capture3.PNG

 

Capture4.PNG

 

 

 

Regards,

Xiaoxin Sheng 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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