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
Anonymous
Not applicable

Relating child line items of same parent

Hi people of powerbi community - i'm fairly new to the power query as a whole and i haven't been able to wrap my head around the below problem:

 

I have a report coming out from a system that shows a 'Process' - 'Sub-Process' - 'Owner of Process' - 'Reviewers of Process' as shown below in a dummy table. 

Parent ProcessUnique IDItem NameOwnerReviewer
A1LeaseJaneAndrew
A2LeaseJaneLaura
A3LeaseJaneJane
A4InvoiceJaneAndrew
A5InvoiceJaneLaura
A6InvoiceJaneJane
B7PayrollTomAndrew
B8PayrollTomTom
C9RentJimmyJimmy

I want to be able to provide 'reviewers' with a 'Pivot table' (they dont have BI licenses) that shows them the Items they have to review & the other reviewers they have to work with (Note owners are default reviewers). Currently the pivot table i export to excel cannot display reviewer > Process > Sub-item > other reviewers because they are not related as line items (my understanding).

 

Is there a way to 'flip' the relation so that each reviewer has a line item with the other reviewers to make the pivot table work -- something like this:

Parent ProcessItem NameReviewerOther ReviewersOwner
ALeaseAndrewLauraJane
ALeaseAndrewJaneJane
ALeaseLauraAndrewJane
ALeaseLauraJaneJane
ALeaseJaneAndrew Jane
ALeaseJaneLauraJane

 

I've tried playing around with pivots, indexing, merging, appending, custom columns but i just can see the way to of getting to my desired pivot table output using power query - but if im missing something much easier i welcome the alternative.

 

Thanks in advance.

1 ACCEPTED SOLUTION
stvsurf
Resolver I
Resolver I

I believe you can achieve this with the following steps:

  1. merge the query with itself on the combination of Parent process and Item name
  2. expand "reviewer" of the result table
  3. hide the line where the original reviewer is the same as the new reviewer
  4. power query parent child.png

View solution in original post

2 REPLIES 2
stvsurf
Resolver I
Resolver I

I believe you can achieve this with the following steps:

  1. merge the query with itself on the combination of Parent process and Item name
  2. expand "reviewer" of the result table
  3. hide the line where the original reviewer is the same as the new reviewer
  4. power query parent child.png
Anonymous
Not applicable

Thanks! that seems to have worked. Not sure i understand the logic of self-merging the table on itself but the result is as desired. Thanks for the help.

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.

Top Solution Authors
Top Kudoed Authors