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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
BenNguyen
Frequent Visitor

Hyperlink multiple slicers to a link

Dear Team,

 I have a test link
https://powerbi.com/reports/powerbi/Production/testData_abcd

and a slicer called "Region" with data: DE, IN, US,...

Requirement: if users select a Region option then that value will be added as a tail in the link above.

I already found a way with IF formulas:

a) RegionSelected = IF(ISFILTERED(Sheet1[Region]),SELECTEDVALUE(Sheet1[Region]),"Select all")

BenNguyen_0-1650365169165.png

it meets the request, BUT if we have multiple slicers then I have to create another IF for each slicer and combine all of them in the DAX. It look too lengthy and unprofessional...

For example: I have one more slicer called "Component". Another IF have been created as following:

c) ComponentSelected = IF(ISFILTERED(Sheet1[Component]),SELECTEDVALUE(Sheet1[Component]),"Select all")
d)
Formula2 = IF([Formula1]="https://powerbi.com/reports/powerbi/Production/testData_abcd", IF([ComponentSelected]="Select all", [Formula1],[Formula1]&" and Sheet1/Component eq '"&[ComponentSelected]&"'")
BenNguyen_0-1650365032234.png
Question:
Do we have another way to sync slicer with a link?
Or another concise formula that can solve this problem?
Could you please check and support? Thank you.

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @BenNguyen ,

According to your description, here's my solution, measures need to be built for each slicer, but the final link only needs one formula.

RegionSelected =
IF (
    ISFILTERED ( Sheet1[Region] ),
    "?filter=Sheet1/Region eq '" & SELECTEDVALUE ( Sheet1[Region] ) & "'",
    BLANK ()
)
ComponentSelected =
IF (
    ISFILTERED ( Sheet1[Component] ) && ISFILTERED ( Sheet1[Region] ),
    " and Sheet1/Component eq '" & SELECTEDVALUE ( Sheet1[Component] ) & "'",
    IF (
        ISFILTERED ( Sheet1[Component] ),
        "?filter=Sheet1/Component eq '" & SELECTEDVALUE ( Sheet1[Component] ) & "'",
        BLANK ()
    )
)
Link =
"https://powerbi.com/reports/powerbi/Production/testData_abcd" & [RegionSelected] & [ComponentSelected]

Get the correct result.

vkalyjmsft_0-1650618848595.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Hi @BenNguyen ,

According to your description, here's my solution, measures need to be built for each slicer, but the final link only needs one formula.

RegionSelected =
IF (
    ISFILTERED ( Sheet1[Region] ),
    "?filter=Sheet1/Region eq '" & SELECTEDVALUE ( Sheet1[Region] ) & "'",
    BLANK ()
)
ComponentSelected =
IF (
    ISFILTERED ( Sheet1[Component] ) && ISFILTERED ( Sheet1[Region] ),
    " and Sheet1/Component eq '" & SELECTEDVALUE ( Sheet1[Component] ) & "'",
    IF (
        ISFILTERED ( Sheet1[Component] ),
        "?filter=Sheet1/Component eq '" & SELECTEDVALUE ( Sheet1[Component] ) & "'",
        BLANK ()
    )
)
Link =
"https://powerbi.com/reports/powerbi/Production/testData_abcd" & [RegionSelected] & [ComponentSelected]

Get the correct result.

vkalyjmsft_0-1650618848595.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Thank you so much @v-yanjiang-msft . That looks really better now.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.