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
CarlsBerg999
Helper V
Helper V

Creating hierarchies from multiple tables

Hi,

 

I'm having issues creating hierarchies with data from multiple tables. The goal is to have a visualization that enables a drilldown feature to lower levels of the hierarchy. I have three tables (Facebook, Twitter, Linkedin) with identical data fields. Facebook is an example below:

 

Facebook:

Media platformCategoryPost IDViews
FacebookPicture1140
FacebookVideo2200
FacebookText370

 

What i want to do, is have a visual where the information is as follows:

Picture5140
Facebook140
Twitter2500
Linkedin2500
Video500
Facebook200
Twitter300
Text170
Facebook70
Linkedin100

 

How do i create hierarchy like this from three different data sources? Basically this could be a Pie Chart where you have Picture, Video and Text, and by clicking on "Text", you get the media sources that comprise the text.  

 

Thank you in advance!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@CarlsBerg999 

maybe you can try this in PQ.

1. select both Media and Category , then unpivot

1.PNG

you can see the column value is that you want.

2.PNG

2. do the same steps for the rest two tables and combine three tables(Append function in PQ)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @CarlsBerg999 

 

If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!

If not, please kindly elaborate more.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
ryan_mayu
Super User
Super User

@CarlsBerg999 

maybe you can try this in PQ.

1. select both Media and Category , then unpivot

1.PNG

you can see the column value is that you want.

2.PNG

2. do the same steps for the rest two tables and combine three tables(Append function in PQ)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




CNENFRNL
Community Champion
Community Champion

Hi, @CarlsBerg999 , since all of your tables consist of idential columns, why not combine them in PQ with simply one step Table.Combine({"Facebook", "Twitter", "Linkedin"}); then you can easily slice and dice the data.

As to hierarchy of axis, you can refer to another thread,

https://community.powerbi.com/t5/Desktop/X-Axis-Label-Hierarchy/td-p/841928


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

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.