Reply
Frequent Visitor
Posts: 10
Registered: ‎11-26-2016
Accepted Solution

Dynamically populate Rows/Columns in a data visual through a Slicer

 

1.) I would like to have a slicer that lists all the column names in a table

 

2.) When I select a colum name value in the slicer, I want to dynamically display the Count and Percent of Total for the selected column in a Power BI visual (a table for example).

 

Is this possible? 

 

Capture.PNG


Accepted Solutions
Frequent Visitor
Posts: 10
Registered: ‎11-26-2016

Re: Dynamically populate Rows/Columns in a data visual through a Slicer

Thanks so much!  That did the trick, I had no idea that was an option.

 

Mike

View solution in original post


All Replies
Community Support Team
Posts: 2,221
Registered: ‎02-06-2018

Re: Dynamically populate Rows/Columns in a data visual through a Slicer

Hi hawb,

 

In Edit Queries, click columns from Q1 to Q24, click Transform-> Unpivot Columns, this will transform all column names to values in a new column, then create a slicer based on that new column.

 

Regards,

Jimmy Tao

Frequent Visitor
Posts: 10
Registered: ‎11-26-2016

Re: Dynamically populate Rows/Columns in a data visual through a Slicer

Thanks so much!  That did the trick, I had no idea that was an option.

 

Mike

Frequent Visitor
Posts: 10
Registered: ‎11-26-2016

Re: Dynamically populate Rows/Columns in a data visual through a Slicer

Jimmy,

 

So your solution works great for generating the source for a filter list.  But, ultimately what I want to do is select a value from the slicer, and have it display the values & counts for the selected field.   For instance, if I select Q12 from the filter, I want to see the unique values in the Q12 data field as well as the counts for each unique value.  If I select Q13, the I want to see unique values and counts for Q13, etc.  But, in this case, the slicer only feeds the field name to the table.  If I summarize (i.e. Count) it will simply show 1 row with the total number of records in the dataset instead of all the unique values in that data field.  Make sense? 

 

Am I missing something? Is it possible?

 

Thanks!

 

Highlighted
Frequent Visitor
Posts: 10
Registered: ‎11-26-2016

Re: Dynamically populate Rows/Columns in a data visual through a Slicer

Ugg. Nevermind. I didnt realize unpivoting produced 2 columns including a value column.  Using the value column provides what I need.