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

custom matrix visual

i have a requirement to build following visual. anyone knows how to achieve this, basically we have multiple product lines on values with different products. when i try to use product on values, it pull first or last, how can i make this work, we have so many products so can't really show all on different lines. any options?

 

aneelismaily82_0-1648834945817.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a matrix visual with the same fields setting as the below screenshot and toggle off the option "Stepped out" under Row headers tab in Format pane...Please check the attachment for more details. 

yingyinr_1-1649055443679.png

Toggle off the option "Stepped out"Toggle off the option "Stepped out"

There is another method mentioned in the attachment, please check whether it suits your scenario.
1. Added an index column group by Line

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dcxJCoAwEATAv+QcMBmzeXSJ+3qW/P8btohCwFy6hyno82RlVTPOZCYzEkQ4y0pSfr8EC/zHG6+0QVPs9Po4IXQC5wVhHmx8Gy+3nTYWnSe8H1wh0Cr2b3zdEDaB+4FwwHAB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Line = _t, Date = _t, Product = _t, Qty = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Line", type text}, {"Date", type date}, {"Product", type text}, {"Qty", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Line"}, {{"Index", each Table.AddIndexColumn(_, "Index",1,1), type table}}),
    #"Expanded Index" = Table.ExpandTableColumn(#"Grouped Rows", "Index", {"Date", "Product", "Qty", "Index"}, {"Date", "Product", "Qty", "Index"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Index",{{"Qty", Int64.Type}, {"Index", Int64.Type}, {"Product", type text}, {"Date", type date}})
in
    #"Changed Type1"

 

yingyinr_3-1649055704979.png2. Create matrix visual as below screenshot

yingyinr_2-1649055671156.png

If the above one can't help you get the desired result, please provide some sample data (exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a matrix visual with the same fields setting as the below screenshot and toggle off the option "Stepped out" under Row headers tab in Format pane...Please check the attachment for more details. 

yingyinr_1-1649055443679.png

Toggle off the option "Stepped out"Toggle off the option "Stepped out"

There is another method mentioned in the attachment, please check whether it suits your scenario.
1. Added an index column group by Line

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dcxJCoAwEATAv+QcMBmzeXSJ+3qW/P8btohCwFy6hyno82RlVTPOZCYzEkQ4y0pSfr8EC/zHG6+0QVPs9Po4IXQC5wVhHmx8Gy+3nTYWnSe8H1wh0Cr2b3zdEDaB+4FwwHAB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Line = _t, Date = _t, Product = _t, Qty = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Line", type text}, {"Date", type date}, {"Product", type text}, {"Qty", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Line"}, {{"Index", each Table.AddIndexColumn(_, "Index",1,1), type table}}),
    #"Expanded Index" = Table.ExpandTableColumn(#"Grouped Rows", "Index", {"Date", "Product", "Qty", "Index"}, {"Date", "Product", "Qty", "Index"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Index",{{"Qty", Int64.Type}, {"Index", Int64.Type}, {"Product", type text}, {"Date", type date}})
in
    #"Changed Type1"

 

yingyinr_3-1649055704979.png2. Create matrix visual as below screenshot

yingyinr_2-1649055671156.png

If the above one can't help you get the desired result, please provide some sample data (exclude sensitive data) and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
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.