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

Select columns in table dynamically based on Slicer

Hello All, 

 

I have a hierarchy of metrics and I want the same to be displayed on the table based on the slicer selection. 

 

For example: 

 

This is the school level data and all of the columns other than the first one is numeric. 

 

ID# StudentsStudents AttendanceTeachers AttendanceAverage Class Size
121780.80.9423
134540.70.812

 

Another table is categories of these metrics

CategoryMetrics
Students# Students
StudentsStudents Attendance
WorkforceTeachers Attendance
SchoolAverage Class Size

 

I have a slicer in my dashboard which shows Category values.

 

I want to create a table which shows me ID and the relevant metrics based on the category selection. I am using simple table graph available in Power BI.

 

If I select Students in my slicer, the table should show - ID, # Students and Students Attendance columns.

 

Could you help me how to solve this?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Select columns in table dynamically based on Slicer

Hi @harshanand007,

 

You could unpivot the first table.

1.PNG2.PNG

 

Establish a one to many relationship between two tables based on Metrics field.

 

Then, use a Matrix visual to display data from Table1. Add category column into slicer.

3.PNG

 

Alternatively, you could try the suggestions in below articles:

Dynamic Column Based on Slicer Selection

Knowledge Base--Dynamic column based on slicer selection

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Select columns in table dynamically based on Slicer

Hi @harshanand007,

 

You could unpivot the first table.

1.PNG2.PNG

 

Establish a one to many relationship between two tables based on Metrics field.

 

Then, use a Matrix visual to display data from Table1. Add category column into slicer.

3.PNG

 

Alternatively, you could try the suggestions in below articles:

Dynamic Column Based on Slicer Selection

Knowledge Base--Dynamic column based on slicer selection

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.