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
Sergiy
Resolver II
Resolver II

Is there a way to know a filter level type (report/page/visual)?

ISFILTERED lets to know if a column is being filtered. I'd like to know if this filter is a report level filter or not. 

Is there a way to know a filter level type (report/page/visual)?

1 ACCEPTED SOLUTION



@Sergiy wrote:

When a report is open filtered by URL query string parameter a user might get confused having switched from target page to another page. A user may not be aware that the whole report got filtered. I'd like to let a user know that a report is filtered on a report level. 

 


So you can't do this from a measure. But users should be able to see the filter in the filters pane.

 

So one option might be to create a small disconnected table with 2 values in it (say 1 & 0) then when ever you build a URL link you add a filter for this table aswell. Then you can create a measure checking for this parameter and use this to display some text to the user saying that a report level url filter is active and that they can see it in the filters pane.

 

So if the table was called UlrParameter and the column was called IsFiltered you could add "&UrlParameter[IsFiltered]=1" to your urls then create a measure like the following:

 

 

[Is URL Filtered] = IF( SelectedValue( UrlParameter[IsFiltered]) == 1, 
"This report has a report level filter applied, you can see this filter by opening the filters pane"
)

 

 

View solution in original post

8 REPLIES 8
d_gosbell
Super User
Super User


@Sergiy wrote:

Is there a way to know a filter level type (report/page/visual)?


No, when you are inside a DAX measure there is no way of knowing this. Each visual fires off it's own queries and the level of the filter just affects how many visuals are affected. Why do you need to know this information?

I knew there is no way but hoped to be mistaken.

 

Why do you need to know this information?

When a report is open filtered by URL query string parameter a user might get confused having switched from target page to another page. A user may not be aware that the whole report got filtered. I'd like to let a user know that a report is filtered on a report level. 

 



@Sergiy wrote:

When a report is open filtered by URL query string parameter a user might get confused having switched from target page to another page. A user may not be aware that the whole report got filtered. I'd like to let a user know that a report is filtered on a report level. 

 


So you can't do this from a measure. But users should be able to see the filter in the filters pane.

 

So one option might be to create a small disconnected table with 2 values in it (say 1 & 0) then when ever you build a URL link you add a filter for this table aswell. Then you can create a measure checking for this parameter and use this to display some text to the user saying that a report level url filter is active and that they can see it in the filters pane.

 

So if the table was called UlrParameter and the column was called IsFiltered you could add "&UrlParameter[IsFiltered]=1" to your urls then create a measure like the following:

 

 

[Is URL Filtered] = IF( SelectedValue( UrlParameter[IsFiltered]) == 1, 
"This report has a report level filter applied, you can see this filter by opening the filters pane"
)

 

 

@d_gosbell ,

The only drawback is one extra filter a user will have to deal with then - "UrlParameter[IsFiltered]) = 1"

A user will have to clear this filter too. One more filter... I guess a user might have questions such as "What is UrlParameter[IsFiltered])?", "Why is it equal 1?", "Why do I have to deal with it?" and so on.

 

I like your idea, though. Thank you for collaboration.


@Sergiy wrote:

The only drawback is one extra filter a user will have to deal with then - "UrlParameter[IsFiltered]) = 1"


Yes, it's not ideal, but I was thinking that this was more something that sophisticated users report builders that are building a system of interlinked reports would deal with. End users would just click on links and slicers and be none the wiser.

 


@Sergiy wrote:

A user will have to clear this filter too. One more filter... I guess a user might have questions such as "What is UrlParameter[IsFiltered])?", "Why is it equal 1?", "Why do I have to deal with it?" and so on.

 


This filter would not change any data, so there should be no need for clearing it. I thought you were targetting end users who are not overly aware of page/report level filters. If the users know enough to be able to "find" this filter then wouldn't they be able to see the other filters passed in on the url?

 

Ultimately I don't think DAX will ever have a feature that knows the "level" of a filter because the level is a report concept.

 

Maybe you could post an request to idea.powerbi.com for some way of displaying URL filters on a visual or something like that.


This filter would not change any data, so there should be no need for clearing it.

If UrlParameter[IsFiltered]) = 1 filter is not cleared then a user will be seeing a warning you proposed "This report has a report level filter applied, you can see this filter by opening the filters pane" for the whole session of working with a report. The filter has to be cleared one way (a user does it by himself) or another ("a system of interlinked reports").

 


I thought you were targetting end users who are not overly aware of page/report level filters.

Yes, I am targeting end users who are not overly aware of page/report level filters. That's why I believe "a system of interlinked reports" could be an option here, but I haven't made my mind yet what way to choose.

 

@d_gosbell thank you for sharing your ideas!

 

I'm just brainstorming some ideas here to see if we can find some work arounds or different approaches. 🙂

 

If you know up front what columns will be used in url filters you could put them in the report filter area ahead of time and create a "clear filters" book mark that sets them back to "All" and sets the UrlParameter[IsFiltered] = 0

Yeah, I can create a bookmark that clears filters. There is no need in putting columns in the report filter area ahead of time. The bookmark will work whether we put columns in the report filter area or not.

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.