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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
whereismydata
Resolver IV
Resolver IV

URL Filter> update existing filter

Hi,

this seem to be something very trivial but I do not find a solution to this:

My report shows data for several locations. When a user opens the report I want the visuals to be empty. Therefore I created a record with the location name 'please choose location' and set the location filter to this record. This all works fine.

 

Also I automatically want to send out mails to user if there is something wrong in their location. In this mail, I want to filter down the report to the exact location with this link for example: https://domain/reports/powerbi/Dashboard?filter=table%2FlocationName%20eq%20%27Location1%27

Now, this works. But my problem is, that the filteritem is duplicated and therefore nothing is show since both filters are applied.

I either need to update the existing or delete/ignore the existing filter.

Maybe someone can help me.

 

Thank you!

1 ACCEPTED SOLUTION
whereismydata
Resolver IV
Resolver IV

Hi @d_gosbell ,

 

thank you for the hint with HASONEFILTER. Based on your solution I did some research an found this: https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/ 

I settled for a combination of your solution and the one suggested in the link. Now I can get rid of my default filer and use URL based filtering.

View solution in original post

3 REPLIES 3
MarcelCz
New Member

I am not sure whether I should open another topic or just use this one. But first I'll try to post here:

 

I have a similar issue as OP:

  • I have a report with multiple sites (report sections)
  • I have a report wide filter that filters all report sections (Single selection filter!) 
    • I do not care about having all visuals on blank before the user makes a selection
    • But I do care about the report wide filter. I dont want to get rid of it since I want the Users to still be able to use the report wide filter on their own
  • I want to send URLs to my Users that pre-filters the report wide filter
  • But here again the URL filter that is created in addition to the existing one collides with the report wide filter (for example if the User has filtered the report using the report wide filter to value X, this information is stored in his browser session. If he now clicks on the URL that filters for Y, all visuals are blank since this is a conflict - again, it is a single selection filter)

Any ideas?

whereismydata
Resolver IV
Resolver IV

Hi @d_gosbell ,

 

thank you for the hint with HASONEFILTER. Based on your solution I did some research an found this: https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/ 

I settled for a combination of your solution and the one suggested in the link. Now I can get rid of my default filer and use URL based filtering.

d_gosbell
Super User
Super User


@whereismydata wrote:

I either need to update the existing or delete/ignore the existing filter.

 


I'm not aware of any way of doing this, the url filters are designed to add to any existing saved filters.

 

One alternate approach is do the check for a location filter in your measures rather than by setting a default filter. So if you save your dashboard with no locations filtered, then wrap all of your measures in an expression like the following:

IF ( HASONEFILTER( table[LocationName] ) ,  <your measure expression> )

 

This will achieve the same result of displaying blank until the user selects a single location and then your url filter will work as you will not have to save the fake "please choose a location' record as the default filter

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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