Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet 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
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:
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:
Solved! Go to Solution.
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.
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.
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.
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.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
22 | |
21 | |
19 | |
13 | |
12 |
User | Count |
---|---|
41 | |
31 | |
23 | |
22 | |
22 |