Forum Discussion
Getting Data from slicer to automatically impact table visual without clicking
Test Dataset:
| Position | ShiftType |
| 1 | First |
| 1 | Second |
| 1 | Third |
| 2 | First |
| 2 | Second |
| 3 | First |
| 3 | Third |
| 4 | Second |
| 4 | Third |
| 5 | First |
| 5 | Second |
1. Create ShiftType slicer (done)
2. Create Position slicer (done)
3. ShiftType Slicer filters Position slicer. (edited interactions) (done)
4. Create a table visual to show all the the ShiftTypes for the positions in the Postions Slicer (need help)
Example:
ShiftType = First
Position Slicer contains: 1,2,3,5
Table visual should show all the ShiftTypes for positions 1,2,3,5.
Method 1:
Interactions:
* ShiftType slicer filters Position Slicer, does NOT filter table visual
* Positions Slicer only filters table visual
Problem:
I have to manually click on all the Positions in the Position Slicer to see all ShiftTypes for those positions.
I want to the table visual to automatically filter based on the Positions in the Position Slicer wihout having to select them indiviudally.
Method 2 (prob doesn't work):
Potentially create a calculated table or use New Measures??
8 Replies
- DataInsightsSuper User
Is this the expected result? This is default behavior (Edit Interactions is enabled between visuals).
- adnijasureRegular Visitor
Hey!
The results should show all the ShiftTypes for given positions. For example if you selected ShiftType First, Positions 1,2,3,5 have ShiftType First. Now in my table I want to show all the ShiftTypes for positions 1,2,3,5 only.
- DataInsightsSuper User
Thanks for clarifying. You'll need a disconnected table (no relationships); this can be created in Power Query or DAX.
Create the measure below:
Shift Type Filter = VAR vSelectedPosition = VALUES ( Position[Position] ) VAR vShiftTypeSelectedPosition = FILTER ( 'Position Disconnected', 'Position Disconnected'[Position] IN vSelectedPosition ) VAR vResult = SUMX ( vShiftTypeSelectedPosition, 1 ) RETURN vResultAdd this measure as a visual filter to a table visual:
In the table visual, add ShiftType from the disconnected table.
-----
- AnonymousNot applicable
Hi adnijasure ,
Try creating an unconnected table:
And the new measure:
Measure = VAR __positions = VALUES('Table'[Position]) VAR __shift_types = CALCULATETABLE( VALUES(Table2[ShiftType]), 'Table2'[Position] IN __positions) VAR __curr_shift_types = SELECTEDVALUE('Table2'[ShiftType]) VAR __filter = IF( __curr_shift_types IN __shift_types, 1) RETURN __filterUse the fields in Table 2 to create a table visual and apply the measure just created to the visual filter:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- adnijasureRegular Visitor
Hey,
Unfortunately that is not the correct output. As you slected ShiftType First, the position slicer is correct. However, in your Table visual with the measure column, Position 4 is included. Whereas it should only be showing all the ShiftTypes for positions 1,2,3,5.