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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic Column Change based on selection

Hi Experts,

 

I am working on matrix table it should display columns based on selection in slicer.

 

For Eg:-  

Graphical Representation: -

 

Dynamic Matrix column view.png

 

In the above two diagrams, assume left visual is matrix table and right visual is slicer.

Based on the selection in the slicer in the first diagram it displays the columns in the matrix table.

And based on the selection in the slicer in the second diagram it displays the columns in the matrix table.

So whenever I select and deselect column in the slicer, dynamically columns should display in the matrix table.

 

I hope that my requirment is understood. If anyone have solution please reply me back.

 

Thanks in Advance

Amith D

 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

 

I think it is normal. If you put a value in 'Value', it will show a list of value for each 'Attribute'. As a workaround, you may create a measure like below. The pbix file is attached in the end.

Result = 
IF(
    SELECTEDVALUE(New[Attribute]) in {"Category","Drawer","Header A","Header B"},
    MAX(New[Value.1]),
    SELECTEDVALUE(New[Value])
)

 

Result:

a1.png

 

Best Regards

Allan

 

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

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

e1.png

 

In order not to affect the raw data, you may duplicate the 'Table', make 'Category', 'Drawer', 'Header A', 'Header B' selected, click 'unpivot columns' in 'Transform' ribbon and then 'Close and Apply'.

e2.png

e3.png

 

Finally you need to create a matrix visual with columns from 'New' table and use 'Attribute' column from 'New' table to filter the result.

e4.png

e5.png

 

Best Regards

Allan

 

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

 

Anonymous
Not applicable

Hi Allan,

 

Thanks for the reply. Funtionality wise your solution is good. 

Please find the below screenshot

 

Amithd007_0-1601009883840.png

When I drag the Value inside values space in matrix it shows for every column.

Value field always should display at last as total.  Only one column. 

 

 

 

Hi, @Anonymous 

 

I think it is normal. If you put a value in 'Value', it will show a list of value for each 'Attribute'. As a workaround, you may create a measure like below. The pbix file is attached in the end.

Result = 
IF(
    SELECTEDVALUE(New[Attribute]) in {"Category","Drawer","Header A","Header B"},
    MAX(New[Value.1]),
    SELECTEDVALUE(New[Value])
)

 

Result:

a1.png

 

Best Regards

Allan

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors