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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.