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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
sobaig
Frequent Visitor

Passing a user selected value in a slicer to the URL parameter

Hi,

 

Currently I am working on a report where I want a user to be able to select a value in a dropdown slicer such that when the user selects a value, the value gets passed to the parameter URL. 

 

For example, 

Let's say there is a dropdown slicer for customer ID. The user selects customer ID 2 in the dropdown slicer. Once that happens, I want the URL to look like this:

...{ReportURL}?filter=[TableName]/CustomerID eq '2'

 

How can I do this? I tried following this resource: https://medium.com/microsoft-power-bi/parameterized-power-bi-navigation-practical-examples-for-using..., but I'm not sure if that is actually showing what I want to do. 

Thanks!

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

Thanks for the valuable input from MFelix.

 

Hi @sobaig ,

 

I will add some details so that the requirements are better realized. Here are the exact steps of my implementation:

1.Here is the example data:

vlinhuizhmsft_0-1728355816929.png

Note that the CustomerID here is of text type.

 

2.Create a measure:

vlinhuizhmsft_1-1728355971744.png

 

If the part of the URL marked in yellow is present in the image, please remove it:

vlinhuizhmsft_2-1728356133328.png

 

3.Create a slicer:

vlinhuizhmsft_3-1728356238963.png

 

4.Insert a button, I use the blank type:

vlinhuizhmsft_4-1728356348448.png

 

5.Open Action and select Web URL:

vlinhuizhmsft_5-1728356481551.png

 

6.Set conditional formatting:

vlinhuizhmsft_6-1728356568209.png

vlinhuizhmsft_7-1728356598728.png

At this point, when you click this button you can open the report with CustomerID equal to 1

vlinhuizhmsft_8-1728356748391.png

Best Regards,
Zhu

 

If there is any 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-linhuizh-msft
Community Support
Community Support

Thanks for the valuable input from MFelix.

 

Hi @sobaig ,

 

I will add some details so that the requirements are better realized. Here are the exact steps of my implementation:

1.Here is the example data:

vlinhuizhmsft_0-1728355816929.png

Note that the CustomerID here is of text type.

 

2.Create a measure:

vlinhuizhmsft_1-1728355971744.png

 

If the part of the URL marked in yellow is present in the image, please remove it:

vlinhuizhmsft_2-1728356133328.png

 

3.Create a slicer:

vlinhuizhmsft_3-1728356238963.png

 

4.Insert a button, I use the blank type:

vlinhuizhmsft_4-1728356348448.png

 

5.Open Action and select Web URL:

vlinhuizhmsft_5-1728356481551.png

 

6.Set conditional formatting:

vlinhuizhmsft_6-1728356568209.png

vlinhuizhmsft_7-1728356598728.png

At this point, when you click this button you can open the report with CustomerID equal to 1

vlinhuizhmsft_8-1728356748391.png

Best Regards,
Zhu

 

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

 

MFelix
Super User
Super User

Hi @sobaig  

 

For this you need to create your DAX measure with the full URL and only add the filter parameter at the end something similar to this:

URL link =
VAR _SelectCustomerID = SELECTEDVALUE(Table[CustomerID])
Return
IF(HASONEVALUE(Table[CustomerID])
"YOUR URL HERE ...{ReportURL}?filter=[TableName]/CustomerID eq '" & _SelectedCustomerID "'")

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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