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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Abbi
Helper I
Helper I

Need hep on Matrix table visualization

Hello All,

 

I have Billdetails table and DependentBill details table and Detailed dependent table respectively.

BillNumberStateCreation dateDescription
101success12-AugGroceries 
102success14-Augfurniture
103success02-SepBakery
104fail16-SepDairy
105processing23-OctBakery

 

 

DependentBillNmberStateCreation dateDescription
2001success13-Aug 
2002success20-Aug 
2003success04-Sep 
2004fail05-Sep 
2005fail26-Oct 
2006processing20-Sep 
2007fail24-Oct 
2008success25-Oct 

 

BillNumber Dependent Bill number 
1012001
1022001
1032003
1042005
105 
1032006
1042008
1022002

 

Looking to create a visual using matrix table as shown below: Required output

BillNumberDependent Bill number statecreation date 
101 success12-Aug 
2001success13-Aug 
102 success14-Aug 
2001success13-Aug 
2002success20-Aug 
103 success02-Sep 
2003success04-Sep 
2006processing20-Sep 

 

Please help

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Abbi 

See if this works for you:

result.PNG

 I created the table in Power Query using the following code:

let
    Source = Table.NestedJoin(BillNumber, {"BillNumber"}, Details, {"BillNumber "}, "Details", JoinKind.LeftOuter),
    #"Expanded Details" = Table.ExpandTableColumn(Source, "Details", {"Dependent Bill number "}, {"Details.Dependent Bill number "}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Details",{"Creation date", "Description", "State"}),
    #"Merged Queries" = Table.NestedJoin(#"Removed Columns", {"Details.Dependent Bill number "}, #"Dependent number", {"DependentBillNmber"}, "Dependent number", JoinKind.LeftOuter),
    #"Expanded Dependent number" = Table.ExpandTableColumn(#"Merged Queries", "Dependent number", {"State", "Creation date"}, {"Dependent number.State", "Dependent number.Creation date"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Dependent number",{{"Dependent number.State", "State"}, {"Dependent number.Creation date", "Creation date"}}),
    #"Appended Query" = Table.Combine({#"Renamed Columns", BillNumber}),
    #"Renamed Columns1" = Table.RenameColumns(#"Appended Query",{{"Details.Dependent Bill number ", "Dependent Number"}})
in
    #"Renamed Columns1"

I've attached the sample PBIX file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

5 REPLIES 5
Abbi
Helper I
Helper I

@PaulDBrown  Thanks a lot for the help. your solution is resolved my problem.

Abbi
Helper I
Helper I

Required output of the above scenario

 

BillNumberDependent Bill number statecreation date
101 success12-Aug
 2001success13-Aug
102 success14-Aug
 2001success13-Aug
 2002success20-Aug
103 success02-Sep
 2003success04-Sep
 2006processing20-Sep

@PaulDBrown Kindly help me out on this

It's working . Thanks a lot for your help

PaulDBrown
Community Champion
Community Champion

@Abbi 

See if this works for you:

result.PNG

 I created the table in Power Query using the following code:

let
    Source = Table.NestedJoin(BillNumber, {"BillNumber"}, Details, {"BillNumber "}, "Details", JoinKind.LeftOuter),
    #"Expanded Details" = Table.ExpandTableColumn(Source, "Details", {"Dependent Bill number "}, {"Details.Dependent Bill number "}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Details",{"Creation date", "Description", "State"}),
    #"Merged Queries" = Table.NestedJoin(#"Removed Columns", {"Details.Dependent Bill number "}, #"Dependent number", {"DependentBillNmber"}, "Dependent number", JoinKind.LeftOuter),
    #"Expanded Dependent number" = Table.ExpandTableColumn(#"Merged Queries", "Dependent number", {"State", "Creation date"}, {"Dependent number.State", "Dependent number.Creation date"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Dependent number",{{"Dependent number.State", "State"}, {"Dependent number.Creation date", "Creation date"}}),
    #"Appended Query" = Table.Combine({#"Renamed Columns", BillNumber}),
    #"Renamed Columns1" = Table.RenameColumns(#"Appended Query",{{"Details.Dependent Bill number ", "Dependent Number"}})
in
    #"Renamed Columns1"

I've attached the sample PBIX file





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors
Top Kudoed Authors