Forum Discussion
Change table data with slicer
So, I have a table like this:
| Player Number | Shots | Shots on target | Pressures | Recoveries | Key Passes | Assists |
| Player 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| Player 2 | 2 | 1 | 2 | 1 | 0 | 0 |
| Player 3 | 1 | 1 | 1 | 0 | 1 | 0 |
I want to create groups:
Group 1 = Shots and Shots on target
Group 2 = Pressures and Recoveries
Group 3 = Key Passes and Assists
Use groups in slicer, and based on the slicer change table data.
When selected Group 1 in slicer:
| Player Number | Shots | Shots on target |
| Player 1 | 0 | 0 |
| Player 2 | 2 | 1 |
| Player 3 | 1 | 1 |
When selected Group 2 in slicer:
| Player Number | Pressures | Recoveries |
| Player 1 | 1 | 0 |
| Player 2 | 2 | 1 |
| Player 3 | 1 | 0 |
When selected Group 3 in slicer:
| Player Number | Key Passes | Assists |
| Player 1 | 1 | 1 |
| Player 2 | 0 | 0 |
| Player 3 | 1 | 0 |
Can anyone help me ?
2 Replies
- OwenAuger
Super User
Hi AGaribay7
1. Create a Field Parameter containing the six measures.
2. Add a "Group" column to the Field Parameter table, either by editing the DAX code for the table or by adding a calculated column.
3. Include the field parameter column in your visual
4. Place Group on slicer
Does this work for you?
- ChiragGarg2512
Solution Sage
This can be done with the help of two slicers.
Step 1: Go to Power Query.Step 2: Select three columns, i.e, shots, pressure and passes. and unpivot them. Do the same with the remaining 3 columns. This will create a 5 column table on PowerQuery with 2 attribute columns and 2 value Column with Player Number.
Step 3: Save the changes.
Step 4: The three columns to be displayed in table should be Player Number, Value, Value1. Two slicers where one has Attribute and another with Attribute1.
Step 5: Selecting 2 columns from slicers will give the desired result.