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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cjc322
Frequent Visitor

Creating a Hierarchy from Multiple Tables

Hello,

I would like to create a Hierarchy for Drill Down purposes within a TABLE.

 

I currently have a report that has a START DATE and END DATE. When a user inputs two dates it shows the NETSALES and NETSALES COMPARISON w/ difference and percnetage difference. Currently I display this in a table by Department Number / Name. 

 

What I would like to do is display this by STORE number and be able to drill down.

I want to go:

STORE > DEPARTMENT > CLASS > SUBCLASS > ITEM SKU

 

All five of the above Fields are in different tables. Store, Department, Class, Item SKU are all also located in the FACT TABLE but SUBCLASS currently is not. However SUBCLASS has an active link to a table that does connect to the FACT TABLE with an active link.

 

Does anyone have any advice how to achieve this?

 

The result I want managers to go in. Select two dates to compare. See all sales for all stores and then drill down to speceifics within the same table to see where sales came from.

 

Thanks in advance.

Chris

2 ACCEPTED SOLUTIONS
ankitpatira
Community Champion
Community Champion

@cjc322 in power bi desktop there is inline-hierarchy option but that only allows hierarchy from the current table. However if you have tables joined then you should be able to create drill down without any extra steps. All you need to do is select chart that supports drill down (column, bar etc) and put multiple fields from multiple tables (all joined) under Axis area.

 

View solution in original post

PowerDAX
Resolver III
Resolver III

You can also denormalize the fields into the table with the lowest granularity (assuming ITEM SKU).  This can be done on your SQL query (if using a query on a db) or iitem table (if other tables are all have relationships) by adding calculated columns to the item table....i.e.

 

SUBCLASS=RELATED( TABLE[SUBCLASS])

CLASS=RELATED( TABLE[CLASS])

DEPARTMENT=RELATED( TABLE[DEPARTMENT])

STORE=RELATED( TABLE[STORE])

 

powerdax.com

View solution in original post

4 REPLIES 4
SIH007_1
Frequent Visitor

Thank you for the answer, works fine. If you create a hierarchy within one table you get such a nice grouping, where you see the hierarchy directly. Will that be possible with more tables sometime?

Jsonify
Frequent Visitor

How can you use hierarchies across multiple tables on a shared dataset? Is that even possible?

PowerDAX
Resolver III
Resolver III

You can also denormalize the fields into the table with the lowest granularity (assuming ITEM SKU).  This can be done on your SQL query (if using a query on a db) or iitem table (if other tables are all have relationships) by adding calculated columns to the item table....i.e.

 

SUBCLASS=RELATED( TABLE[SUBCLASS])

CLASS=RELATED( TABLE[CLASS])

DEPARTMENT=RELATED( TABLE[DEPARTMENT])

STORE=RELATED( TABLE[STORE])

 

powerdax.com
ankitpatira
Community Champion
Community Champion

@cjc322 in power bi desktop there is inline-hierarchy option but that only allows hierarchy from the current table. However if you have tables joined then you should be able to create drill down without any extra steps. All you need to do is select chart that supports drill down (column, bar etc) and put multiple fields from multiple tables (all joined) under Axis area.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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