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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gauravnarchal
Post Prodigy
Post Prodigy

Need help - Change table visual based on value in slicer

Hello -  How can I change the visual in the table based on the selection?

 

For eg:-

 

If I select client ABC (In SLicer), I want the table visual to show remark 1, remark 2, remark 3 along with the columns in green

 

and if I selected client XYZ (In SLicer) I want to show remark 5, remark 8, remark 9 along with the columns in green

 

Data

 

InvoiceDateClientNameInvoiceNumberInvoiceIDRemark 1Remark 2Remark 3Remark 5Remark 8Remark 9
8/17/2021 0:00ABC817064926099123ABC
8/17/2021 0:00ABC817065926101456ABC
8/17/2021 0:00ABC817068926105789ABC
8/17/2021 0:00ABC817069926107101112ABC
8/17/2021 0:00XYZ817071926169131415131415
8/17/2021 0:00XYZ817077926112131415202122
8/17/2021 0:00XYZ817078926114131415232425
8/17/2021 0:00XYZ817087926134131415262728
8/17/2021 0:00XYZ817088926136131415293031

 

 

Result - If I select Client Name ABC

 

InvoiceDateClientNameInvoiceNumberInvoiceIDRemark 1Remark 2Remark 3
8/17/2021 0:00ABC817064926099123
8/17/2021 0:00ABC817065926101456
8/17/2021 0:00ABC817068926105789
8/17/2021 0:00ABC817069926107101112
8/17/2021 0:00XYZ817071926169131415
8/17/2021 0:00XYZ817077926112131415
8/17/2021 0:00XYZ817078926114131415
8/17/2021 0:00XYZ817087926134131415
8/17/2021 0:00XYZ817088926136131415

 

Result - If I select client name XYZ

 

InvoiceDateClientNameInvoiceNumberInvoiceIDRemark 5Remark 8Remark 9
8/17/2021 0:00ABC817064926099ABC
8/17/2021 0:00ABC817065926101ABC
8/17/2021 0:00ABC817068926105ABC
8/17/2021 0:00ABC817069926107ABC
8/17/2021 0:00XYZ817071926169131415
8/17/2021 0:00XYZ817077926112202122
8/17/2021 0:00XYZ817078926114232425
8/17/2021 0:00XYZ817087926134262728
8/17/2021 0:00XYZ817088926136293031
1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @gauravnarchal ,

 

I test two ways to achieve it.

 

1. Add bookmarks. 

 

Referencing: https://www.youtube.com/watch?v=FBEF1xMxxEE 

 

image.png

image.png

 

2. Unpivot columns.

  • Unpivot columns in Power Query Editor.

vkkfmsft_0-1629452373395.png

vkkfmsft_1-1629452424746.png

 

  • Create a calculation table.
ClientName = DISTINCT('Table'[ClientName])

vkkfmsft_2-1629452446551.png

  • Create the following measures.
Measure = 
IF(
    SELECTEDVALUE(ClientName[ClientName]) = "ABC", 
    COUNTROWS(
        INTERSECT(
            CALCULATETABLE(
                VALUES('Table'[Attribute]),
                FILTER(
                    'Table',
                    'Table'[Attribute] in {"Remark 1", "Remark 2", "Remark 3"}
                )
            ),
            DISTINCT('Table'[Attribute])
        )
    ),
    COUNTROWS(
        INTERSECT(
            CALCULATETABLE(
                VALUES('Table'[Attribute]),
                FILTER(
                    'Table',
                    'Table'[Attribute] in {"Remark 5", "Remark 8", "Remark 9"}
                )
            ),
            DISTINCT('Table'[Attribute])
        )
    )
)
RemarkValue = MAX('Table'[Value])
  • Filter the matrix by Measure.

vkkfmsft_3-1629452715994.png

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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-kkf-msft
Community Support
Community Support

Hi @gauravnarchal ,

 

I test two ways to achieve it.

 

1. Add bookmarks. 

 

Referencing: https://www.youtube.com/watch?v=FBEF1xMxxEE 

 

image.png

image.png

 

2. Unpivot columns.

  • Unpivot columns in Power Query Editor.

vkkfmsft_0-1629452373395.png

vkkfmsft_1-1629452424746.png

 

  • Create a calculation table.
ClientName = DISTINCT('Table'[ClientName])

vkkfmsft_2-1629452446551.png

  • Create the following measures.
Measure = 
IF(
    SELECTEDVALUE(ClientName[ClientName]) = "ABC", 
    COUNTROWS(
        INTERSECT(
            CALCULATETABLE(
                VALUES('Table'[Attribute]),
                FILTER(
                    'Table',
                    'Table'[Attribute] in {"Remark 1", "Remark 2", "Remark 3"}
                )
            ),
            DISTINCT('Table'[Attribute])
        )
    ),
    COUNTROWS(
        INTERSECT(
            CALCULATETABLE(
                VALUES('Table'[Attribute]),
                FILTER(
                    'Table',
                    'Table'[Attribute] in {"Remark 5", "Remark 8", "Remark 9"}
                )
            ),
            DISTINCT('Table'[Attribute])
        )
    )
)
RemarkValue = MAX('Table'[Value])
  • Filter the matrix by Measure.

vkkfmsft_3-1629452715994.png

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

amitchandak
Super User
Super User

@gauravnarchal , I think you need bookmarks and button for that. Slicer might not help

 

bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors