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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sks2701
Helper III
Helper III

Help with slicers

Dear All

 

I have a slicer , that has value "Yes" and "No" as drop down , My dashboard also has a table with fOUR detail columns . my question is I want the table to change as per the slicer value selected . so for example if I select No in the slicer in the table i should see column A, column B , column C , and column D. 

However if i select Yes in the slicer , I should see additioanl column E and F in the table along with A, B C and D columns. Having said this the default view of my table should include only four columnns, its only when i select yes , it should show additional columns in the table.

How can this be achieved?- thank you!

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @sks2701 ,

If you want to use slicer to achieve this, I think you need to transfrom your datasets using 'unpivot columns' in power query editors; then create a measure like this, put it in the table visual and set its value as 1 or 2:

Visual control =
IF (
    SELECTEDVALUE ( 'Slicer table'[slicer] ) = "Yes",
    1,
    IF (
         (
            SELECTEDVALUE ( 'Slicer table'[slicer] ) = "No"
                || NOT ( ISFILTERED ( 'Slicer table'[slicer] ) )
        )
            && (
                SELECTEDVALUE ( 'Table'[Attribute] ) = "A"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "B"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "C"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "D"
            ),
        2
    )
)

s1.pngs2.pngs3.png

Attached a sample file in the below, hopes to help you.

 

If not want to transform data, bookmarks like @ StefanoGrimaldi mentioned is another good way to achieve this.

 

Best Regards,
Community Support Team _ Yingjie Li
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

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @sks2701 ,

If you want to use slicer to achieve this, I think you need to transfrom your datasets using 'unpivot columns' in power query editors; then create a measure like this, put it in the table visual and set its value as 1 or 2:

Visual control =
IF (
    SELECTEDVALUE ( 'Slicer table'[slicer] ) = "Yes",
    1,
    IF (
         (
            SELECTEDVALUE ( 'Slicer table'[slicer] ) = "No"
                || NOT ( ISFILTERED ( 'Slicer table'[slicer] ) )
        )
            && (
                SELECTEDVALUE ( 'Table'[Attribute] ) = "A"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "B"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "C"
                    || SELECTEDVALUE ( 'Table'[Attribute] ) = "D"
            ),
        2
    )
)

s1.pngs2.pngs3.png

Attached a sample file in the below, hopes to help you.

 

If not want to transform data, bookmarks like @ StefanoGrimaldi mentioned is another good way to achieve this.

 

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

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey for this ou wont do with a slicer you will neeed selection pane and bookmakrs read this for more detail about it: 

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks 

https://social.technet.microsoft.com/wiki/contents/articles/50900.power-bi-explore-the-new-selection... 

https://www.youtube.com/watch?v=_Afcj8mT5_Q specially here you have a full build example. 

if this solve your question please give some kudos and mark as solution for others to find. 

 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors