Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
adnijasure
Regular Visitor

Getting Data from slicer to automatically impact table visual without clicking

Test Dataset:

PositionShiftType
1

First

1Second
1Third
2First
2Second
3First
3Third
4Second
4Third
5First
5Second


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 8
v-cgao-msft
Community Support
Community Support

Hi @adnijasure ,

 

Try creating an unconnected table:

vcgaomsft_1-1739153391296.png

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
    __filter

Use the fields in Table 2 to create a table visual and apply the measure just created to the visual filter:

vcgaomsft_2-1739153584194.png

vcgaomsft_3-1739153617369.png

 

Best Regards,
Gao

Community Support Team

 

If 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

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.

DataInsights
Super User
Super User

@adnijasure,

 

Is this the expected result? This is default behavior (Edit Interactions is enabled between visuals).

 

DataInsights_0-1739033789865.png

 





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

Proud to be a Super User!




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. 

@adnijasure,

 

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
    vResult

 

Add this measure as a visual filter to a table visual:

 

DataInsights_0-1739201282819.png

 

In the table visual, add ShiftType from the disconnected table.

 

DataInsights_1-1739201380079.png

-----

 

DataInsights_2-1739201399643.png

 





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

Proud to be a Super User!




@DataInsights sorry for any confusion, I appreciate all the help. Let me go into more detail about what my expected output is and what I have tried so far. 

Raw Data (raw_data):

adnijasure_0-1739208404457.png

First Step - Create a ShiftType Slicer

Second Step - Create a Position Slicer

Third Step - Create table visual with positions and ShiftType

My thought process:

Connections: 
ShiftType slicer: Only Filters the Positions Slicer, doesn't filter the table visual in Third Step

Position slicer: Only Filters the table visual in Third Step

adnijasure_1-1739208550799.png


Example case (Third ShiftType): 

adnijasure_2-1739208612425.png

The Position Slicer filters correctly, however, the table visual shows all the Positions and all ShiftTypes. I only want to see the All the ShiftTypes for Positions 1,3,4. 

Expected Output:

adnijasure_3-1739208718301.png

The expected output only displays when I select the Positions in the Position Slicer. This is an inefficient way becasue if I had multiple 100 Positions it would be ineffcient to click on all of them. 

I want to find a way for the table visual to show all the Positions in the position slicer and all the ShiftTypes for those positions wihthout having to select the each position in the Positions Slicer. 

Hope this brings some more clarity 🙂 

 

 

 

@adnijasure,

 

If you enable interactions between the ShiftType slicer and table visual, selecting a ShiftType will 1) filter the Position slicer (interactions already enabled) and 2) filter the table visual for the selected ShiftType. Selecting all values in a slicer is the same as selecting no values in a slicer, so there's no need to select all values in the Position slicer after selecting a ShiftType.





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

Proud to be a Super User!




@DataInsights sorry for the confusion, I appreciate all the help. Let me explain the process in more detail and provide images for clarity. 

Dataset (Raw_Data): 

adnijasure_0-1739207037579.png

 

First step: Create a ShiftType slicer

adnijasure_1-1739207251468.png

 

Second Step: Create Positions Slicer

adnijasure_2-1739207347627.png


Third Step: Create a table visual that contains Position and ShiftType as columns

adnijasure_0-1739207037579.png

 

 

My thought process: 
Connections: 

  • ShiftType slicer: Filters positions only, does NOT filter table visual in the third step. 
  • Position slicer: Filters the table visual only

adnijasure_3-1739207660874.png

I was under the impressions that since ShiftType slicer is only affecting the Positions Slicer and not the table, and that the Position slicer is only affecting the Table Visual, that all the positions in the Position Slicer would show up in the Positions in the Table Visual. 

Example: 
If I select third ShiftType, the Positions filter should only have Positions 1,3,4 (which it does). However, the table visual shows all the position numbers. 

EXPECTED OUTPUT:

adnijasure_4-1739207822681.png

The expected output which shows all the Shifts for the Positions in the Positions slicer only show when I select all of the positions in the Position Slicer. 

What I want to happen is for that to happen but by not having to select all the Positions in the Position Slicer becasue it is inefficient, I could have 100+ positions and it would be inefficient to click all of them individually. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors