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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Table/Matrix visual to collapse and expand visuals

I have a table visual or matrix visual as should below:

EalTim_0-1647604733333.png

However, I want to create a visual like below

EalTim_1-1647604788655.png

Where Name and Date can collapse and expand to see the subtotal of Type and Linecode.

How can I achieve this in power BI. I have tried using matrix but not getting it.

Please help

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Suppose you have the following data.

 

vkkfmsft_0-1647926568623.png

 

1. Then you can first unpivot the [Type] and [LineCode] columns. 

 

vkkfmsft_1-1647926595639.png

 

2. Create custom column.

 

Amount = if [Attribute] = "Type" then [TypeAmount] else [LineCodeAmount]

vkkfmsft_2-1647926718012.png

 

3. Create a matrix visual and add the following fields.

 

vkkfmsft_7-1647927114662.png

 

4. Turn off the "Stepped layout" option.

 

vkkfmsft_3-1647926906440.png

 

5. Turn off the row subtotals for the Attribute column and the Value column. And set the position of the totals to the top.

 

vkkfmsft_4-1647926940020.png        vkkfmsft_5-1647926962042.png       vkkfmsft_6-1647926991693.png

 

Then you can click on the expand/collapse symbol in front of the [Date] column.

 

vkkfmsft_8-1647927470250.png vkkfmsft_9-1647927514992.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Suppose you have the following data.

 

vkkfmsft_0-1647926568623.png

 

1. Then you can first unpivot the [Type] and [LineCode] columns. 

 

vkkfmsft_1-1647926595639.png

 

2. Create custom column.

 

Amount = if [Attribute] = "Type" then [TypeAmount] else [LineCodeAmount]

vkkfmsft_2-1647926718012.png

 

3. Create a matrix visual and add the following fields.

 

vkkfmsft_7-1647927114662.png

 

4. Turn off the "Stepped layout" option.

 

vkkfmsft_3-1647926906440.png

 

5. Turn off the row subtotals for the Attribute column and the Value column. And set the position of the totals to the top.

 

vkkfmsft_4-1647926940020.png        vkkfmsft_5-1647926962042.png       vkkfmsft_6-1647926991693.png

 

Then you can click on the expand/collapse symbol in front of the [Date] column.

 

vkkfmsft_8-1647927470250.png vkkfmsft_9-1647927514992.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

lbendlin
Super User
Super User

Are you aware of the "Show values on rows" feature for matrix visuals?  That will get you halfway there.  Your expected format is not something that can be achieved with the standard visuals.  You may have to craft your own, or modify your expectations.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.