cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bi_poweruser429
Frequent Visitor

Table visual - Is it possible to dynamically add/remove columns?

I have seen a lot of tutorials on how to dynamically change column selection in table visuals and matrices but none of them have quite fit my use case.  Basically, I'm wondering if it is possible to allow a user to use a table visual or a matrix to display a custom cross-section of different segments, without the use of a unique record identifier.  For example the whole cross-section would look like this:

 

bi_poweruser429_0-1608234549539.png

But I would need the slicer to dynamically change what the user sees; e.g. if the user only chooses "Merchant" then I only want to see the following:

 

bi_poweruser429_1-1608234661924.png

 

So I'm less interested in a specific solution to my problem, more just wondering if what I'm attempting to do is even possible, and also if it is possible to do without unpivoting my data.  My actual data file has nearly 10 million records and about 9 different categories so I am not looking to impede performance.

 

Thank you for any help

 

1 ACCEPTED SOLUTION

While this is somewhat along the lines of what I am looking for, I do need the ability to see more than the MAX() value which would mean that the table expands horizontally and vertically when more categories are added, and contracts when they are removed.  There appears to be no native functionality in PowerBI to allow what I am looking for, so I am going to have to use bookmarks to achieve it.  Thank you though.

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @bi_poweruser429 ,

 

First create a slicer table as below:

v-kelly-msft_0-1608532385152.png

 

Then create a measure as below:

Measure = SWITCH(
    SELECTEDVALUE('Slicer table'[Slicers]),
    "Merchant",MAX('Table'[Merchant]),
    "Product",MAX('Table'[Product]),BLANK())

And you will see:

v-kelly-msft_1-1608532432725.pngv-kelly-msft_2-1608532441114.png

I also added another option of unpivoting the table to realize it in my sample .pbix file,you could turn to it to check which one is better.Pls check attachment for details.

 

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

While this is somewhat along the lines of what I am looking for, I do need the ability to see more than the MAX() value which would mean that the table expands horizontally and vertically when more categories are added, and contracts when they are removed.  There appears to be no native functionality in PowerBI to allow what I am looking for, so I am going to have to use bookmarks to achieve it.  Thank you though.

View solution in original post

Hi @bi_poweruser429 ,

 

Sorry for not being able to help on this issue,since you have a good idea of using bookmarks to address it,could you pls mark the reply as answered to let more people find the solution.

Much appreciated.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

amitchandak
Super User IV
Super User IV

@bi_poweruser429 , You can replace measure values. Or you can make it blank. Using the meausre slicer.

measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

// With external tools you have some more flexibility
https://www.youtube.com/watch?v=vlnx7QUVYME

But to hide show, you need bookmarks

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.