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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
v-yiruan-msft
Community Support
Community Support

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

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

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

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

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

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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