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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jakubalbrecht
Helper I
Helper I

Merge URL parameters filters and predefined filters

Hello,

 

1. I can predefine filters in Power BI reports so that readers of the Power BI report in online Power BI service evironment can then filter the report using those filters, they cannot use other data to filter the report. That works fine for me.

 

2. I can also use URL parameters to define the filtering value through URL. That also works fine for me.

 

My trouble is that when I use both options for the same Table/Column (so I set that Table/Column as a predefined filter and in the same time I call the report with URL parameters like https://app.powerbi.com/...&filter=Languages%2FLanguage%20eq%20%27cs%27) those filters do not merge into the single filter but appear as two indepenent filters although they filter the same Table/Column and have the same name:

jakubalbrecht_0-1721083163850.png

Please, do you have some hack how to merge both filters into the single one?

 

And one more addition question with much less urgency: Is there any option how to define filter in Power BI desktop, change the filter name different to the original Column name and then use URL parameters to be merged with that renamed filter? E.g.: Original Table/Column name is "Languages/Language" which I use as predefined filter renamed to "Lang". Then I would like to be able to filter report using URL parameters which will be merged with "Lang" filter as the filter the same original Column/Table.

 

Thank you.

 

Jakub

5 REPLIES 5
jakubalbrecht
Helper I
Helper I

Hello @Anonymous ,

 

thank you very much but there is still no progress on my side.

 

https://app.powerbi.com/groups/...../reports/.....&filter=Languages%2FLanguage%20in%20(%27en%27)

 

still duplicit filter is created - in my original report and ever the same on a brand new report when only a single table Languages has been created with a single column Language to avoid interferencing with other data:

jakubalbrecht_0-1721678621304.pngjakubalbrecht_1-1721678638413.png

 

jakubalbrecht_2-1721678774854.png

 

I really do not understand why your and mine result is different while sharing the same approach. Power BI URL filtering seems not to be an excellent piece of work by Microsoft.

 

Any other idea how to solve it?

Anonymous
Not applicable

Hi @jakubalbrecht ,

 

Is it possible to consider hard-coding the original filter to the Dax measure? If so, please refer to the following steps:

1. For the original report, we need to clear the filter on 'Languages' [Language]:

vcgaomsft_0-1721703877367.png

 

2. then please create a new pbix. here we need a dimLanguages table:

vcgaomsft_1-1721704024207.png

 

3. then create a new measure like:

 

 

Report URL = 
// You need to replace the base url with the actual URL of your own report
VAR __base_url = "https://app.powerbi.com/groups/5562e085-51a1-4c99-aa4f-6ab2a5351adc/reports/80805289-a9e0-4de2-b4a6-5c34167faa03/"
// Here we assume the original filter was 'cs' before
VAR __filter1 = "?filter=Languages/Language in ('cs','"
VAR __filter2 = CONCATENATEX('DimLanguages','DimLanguages'[Language],"','")
VAR __result = __base_url & __filter1 & __filter2 & "')"
RETURN
__result

 

Here setting the data category as WebUrl

vcgaomsft_2-1721704251600.png

 

4. Do some landscaping. Here I'm assuming the original filter was 'cs' and I've hidden the 'cs' option in the slicer. Then created a button and bound the previously created measure. It looks like this now:

vcgaomsft_3-1721704533757.png

 

 

 

5. Publish. When we select the slicer, the measure automatically generates a link to the report containing the URL filter:

vcgaomsft_5-1721704828823.png


Clicking the button will automatically jump to the report:

vcgaomsft_6-1721704912527.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Anonymous
Not applicable

Hi @jakubalbrecht ,

 

-- Do you have some hack how to merge both filters into the single one?

Yes, please refer to an example like this:

?filter=Store/Territory in ('NC', 'TN')

Filter a report using query string parameters in the URL - Filter on more than one value in a field

 

The second point should not work, you need to use to the original table name and field names.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Hello, @Anonymous ,

 

thank you for your reply. I changed the filtering URL from "?filter=Languages/Language eq 'en'" to "?filter=Languages/Language in ('en')" as you recommeded but unfortenatelly there is no change.

 

The filtering pane when no URL filtering is appplied - https://app.powerbi.com/.../reports/...:

jakubalbrecht_1-1721591953371.png

 

The filtering pane when URL filtering is appplied - https://app.powerbi.com/.../reports/... ?filter=Languages/Language in ('en'):

jakubalbrecht_0-1721591900813.png

 

Anonymous
Not applicable

Hi @jakubalbrecht ,

 

Try append this code to the URL:

&filter=Languages%2FLanguage%20in%20(%27en%27)

 

You can also remove the code at the end and append the previous code:

vcgaomsft_0-1721610940463.png

vcgaomsft_1-1721611100731.png

Output:

vcgaomsft_2-1721611150534.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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