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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GlitterL
Frequent Visitor

Multiple populated Matrix - for power bi desktop or report builder

Hey hey, 

 

I am new to PB, and I'm a bit stuck,

I have this data with different categories, see example below (as I cannot provide the real data due to privacy)

 

DateCategoryLinkColourData

May 2022

carcar_redred5
April 2020busbus_redred15
May 2022carcar_blueblue2
June 2021taxitaxi_redred1
June 2021carcar_redred7

 

I want each Category to populate its own matrix like below, with the header being the category:

{(Header) = Category} - Car

 RedBlue
May 202252
June 20217 

 

{(Header) = Category} - Bus

 RedBlue
April 202015 

 

{(Header) = Category} - Taxi

 RedBlue
June 20211 

 

Please assist me and indicate if this is possible, I need to create paginated reports and each category needs to be on a single page

1 ACCEPTED SOLUTION
jbwtp
Memorable Member
Memorable Member

Hi @GlitterL,

 

Something like this(uing Pivot Column on the Transform menu tab)?

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k2s1DUyUtJRSk4sgpDxRakpQBaENFWK1YlWciwo0jUyAHKTSoshJIoiQ4gqLEYl5ZSmgjRAKCOwMq/SPF0jQyC3JLEiE0qhGoeqDLvDzGGKUhWMDIgzDq4Sp4mxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Category = _t, Link = _t, Colour = _t, Data = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Category", type text}, {"Link", type text}, {"Colour", type text}, {"Data", Int64.Type}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Colour]), "Colour", "Data", List.Sum),
    #"Filtered Rows" = Table.SelectRows(#"Pivoted Column", each ([Category] = "bus"))
in
    #"Filtered Rows"

 

Kind regards,

John

View solution in original post

1 REPLY 1
jbwtp
Memorable Member
Memorable Member

Hi @GlitterL,

 

Something like this(uing Pivot Column on the Transform menu tab)?

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k2s1DUyUtJRSk4sgpDxRakpQBaENFWK1YlWciwo0jUyAHKTSoshJIoiQ4gqLEYl5ZSmgjRAKCOwMq/SPF0jQyC3JLEiE0qhGoeqDLvDzGGKUhWMDIgzDq4Sp4mxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Category = _t, Link = _t, Colour = _t, Data = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Category", type text}, {"Link", type text}, {"Colour", type text}, {"Data", Int64.Type}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Colour]), "Colour", "Data", List.Sum),
    #"Filtered Rows" = Table.SelectRows(#"Pivoted Column", each ([Category] = "bus"))
in
    #"Filtered Rows"

 

Kind regards,

John

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.