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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Slice Table by Data in Multiple Columns

Hi everyone.  I was looking through similar posts but could not find a question seemingly the same.

 

I have a source table with rows defined for each "task" and then 3 columns indicating the person assigned to each position of the task (see example table).  As one person may be assigned to a different position, given the task, I am looking for a way to create a slicer by "person" that would allow to filter for all tasks assigned to that person, regardless of position.

TaskPosition 1Position 2Position 3
1AlexBritneyCharles
2BritneyCharlesDarla
3CharlesDarlaEric
4AlexCharlesDarla
5FrankBritneyHelen
6GaryEricFrank

 

I HAVE had success "unpivoting" the position columns in the power queary, essentailly making 6 rows into 18, and then rebuilding the "Position" columns with DAX

 

Gorlinjer_0-1710361148340.png

 

Then, I rebuilt the table visual using the "last" values for each position:

 

Gorlinjer_1-1710361268492.png

Finally, I added a slicer for the created "Values" column (each person), and it WORKS!!!... however, the slicer then also removes the other assigned people to that task (which is definitely as expected).

 

Gorlinjer_2-1710361353678.png

 

My end goal is to create that table/slicer from the original data, but when a person is selected, I need to be able to see the other people assigned to that task.  I hope this makes sense!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try this way.
I add a new table to create the slicer:

vjunyantmsft_0-1710383104296.png

There is no relationship between two tables:

vjunyantmsft_1-1710383135105.png


Use this DAX to create a measure:

Measure = 
VAR _P = ALLSELECTED('Slicer'[Name])
RETURN
IF(
    ISFILTERED('Slicer'[Name]),
    IF(
        COUNTROWS(
            FILTER(
                _P,
                [Name] IN VALUES('Table'[Position 1]) ||
                [Name] IN VALUES('Table'[Position 2]) ||
                [Name] IN VALUES('Table'[Position 3])
            )
        ) > 0,
        1,
        0
    ),
    1
)

Set the settings according to the following screenshot:

vjunyantmsft_2-1710383231757.png

vjunyantmsft_3-1710383266297.png

The final output is as below:

vjunyantmsft_4-1710383298633.png

vjunyantmsft_5-1710383308880.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello!  Me again!

 

So, this fix has helped in getting the table to do as desired (slice by a name, and all relevant rows remain).  

 

However, I need help knowing if I can carry this "slice/filter" across all other visuals.  For example with the sample data provided, if I wanted to add a card for counting total tasks, and then tasks assigned.  (ie. would display "6" when unfiltered, but when Britney is selected, the card would display "3").

 

I tried applying the same method of including that measure as a filter on the "card" but it does not let me change the settings to "is 1".

 

I hope this makes sense.  Thank you.

Anonymous
Not applicable

Thank you!  This worked perfectly!

Anonymous
Not applicable

Hi @Anonymous ,

Please try this way.
I add a new table to create the slicer:

vjunyantmsft_0-1710383104296.png

There is no relationship between two tables:

vjunyantmsft_1-1710383135105.png


Use this DAX to create a measure:

Measure = 
VAR _P = ALLSELECTED('Slicer'[Name])
RETURN
IF(
    ISFILTERED('Slicer'[Name]),
    IF(
        COUNTROWS(
            FILTER(
                _P,
                [Name] IN VALUES('Table'[Position 1]) ||
                [Name] IN VALUES('Table'[Position 2]) ||
                [Name] IN VALUES('Table'[Position 3])
            )
        ) > 0,
        1,
        0
    ),
    1
)

Set the settings according to the following screenshot:

vjunyantmsft_2-1710383231757.png

vjunyantmsft_3-1710383266297.png

The final output is as below:

vjunyantmsft_4-1710383298633.png

vjunyantmsft_5-1710383308880.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.