cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
javi0unavailabl Regular Visitor
Regular Visitor

Show active filters.

Hello.

 

I have a very extensive report with a lot of slicers.

 

What I need is something that shows me the filters applied (or slicers) at the moment. It dynamically should change when a slicer is (des)selected.

 

Since Power BI does not offer this feature, I need a workaround.

 

What I achieved:

In another smaller report, I created one measure for each column that returns a text if the column ISFILTERED:

  

M_checkfilter = IF(ISFILTERED(Table[Column]);"Filter is Active";"")

This measure is used within a text box card visual and situated above a slicer that filters the previous column referenced. Then, when the slicer is actived, the text appears (color: red, font size: medium-high) so the user can easily show what filters are actived.

 

Well, it works, but in an extensive report it comes unmanageable creating one measure and text box for each column. I'm looking for something more centralized.

 

I hope you can come up with something.

 

Thank you.

 

----

Javi

1 ACCEPTED SOLUTION

Accepted Solutions
javi0unavailabl Regular Visitor
Regular Visitor

Re: Show active filters.

Ok... I achieved a solution... it is not very orthodox but it works fine... Very tedious to write...

 

It consists in a Measure of more than 120 lines (because the big number of columns and tables) with a text result that I can insert into a Card visualization or a table for better viewing.

 

The approximate formula syntax of the measure is like this:

 

_Active filters_ = 
"FilterSubsection:"
&IF(ISFILTERED(Table1[Column1]);
    UNICHAR(10)&"- StringColumnName: "& CONCATENATEX(VALUES(Table1[Column1]);Table1[Column1];", "))
&IF(ISFILTERED(Table1[Column2])
... (etc)

Where u see Table1 you can refer to Table2, Table3 an so on.

UNICHAR(10) is a newline character and & simbol is to concatenate strings.

 

Hope this serves to someone in the future and really hope that the PBI team include a feature to achieve this easier.

 

Thanks.

View solution in original post

11 REPLIES 11
Microsoft v-huizhn-msft
Microsoft

Re: Show active filters.

Hi @javi0unavailabl,

After test, the measure and column are not supported in text box, you can create a card visual to display the measure. You can review the following feature request and vote it, you also create an idea here.

Description to the Calculated Columns & Measures

Best Regards,
Angelia

javi0unavailabl Regular Visitor
Regular Visitor

Re: Show active filters.

Hi @v-huizhn-msft

 

I'm sorry. I meant Card visual instead text box.

javi0unavailabl Regular Visitor
Regular Visitor

Re: Show active filters.

Ok... I achieved a solution... it is not very orthodox but it works fine... Very tedious to write...

 

It consists in a Measure of more than 120 lines (because the big number of columns and tables) with a text result that I can insert into a Card visualization or a table for better viewing.

 

The approximate formula syntax of the measure is like this:

 

_Active filters_ = 
"FilterSubsection:"
&IF(ISFILTERED(Table1[Column1]);
    UNICHAR(10)&"- StringColumnName: "& CONCATENATEX(VALUES(Table1[Column1]);Table1[Column1];", "))
&IF(ISFILTERED(Table1[Column2])
... (etc)

Where u see Table1 you can refer to Table2, Table3 an so on.

UNICHAR(10) is a newline character and & simbol is to concatenate strings.

 

Hope this serves to someone in the future and really hope that the PBI team include a feature to achieve this easier.

 

Thanks.

View solution in original post

Bruno_Cippitell Frequent Visitor
Frequent Visitor

Re: Show active filters.

Thak you very much for sharing. It works perfect and I have to say: it is not that tedious and simply to achieve.

Two days ago a customer ask to have "Active filter" text solution and this solution fits perfectly. Thaks one more time.

Bruno_Cippitell Frequent Visitor
Frequent Visitor

Re: Show active filters.

Thank you very much for sharing.

It works perfect and I have to say: it is not that tedious and simply to achieve.

Two days ago a customer asked me to have "Active filter" text solution on a report and this solution fits perfectly. Thaks you one more time.

areymejias Frequent Visitor
Frequent Visitor

Re: Show active filters.

First of all, thanks for the amazing post, it was really usefull for me.  

 

Although it works perfectly when i applied the sintax: 

Filter activ =
"Filter active:"
&IF(ISFILTERED(event[Sex])
;UNICHAR(10)&"Sex: "& CONCATENATEX(VALUES(event[Sex]);event[Sex];", "))
&IF(ISFILTERED(event[age])
;UNICHAR(10)&"Ages: "& CONCATENATEX(VALUES(event[age]);event[age];", "))
&IF(ISFILTERED(eventoysujeto[Date])
;UNICHAR(10)&"Date: "& CONCATENATEX(VALUES(event[Date]);eventoysujeto[Date];", "))

 

It shows me something (perfect) like:

 

Filter active:

Sex: Male.

Age: 85, 88, 73, 55, 80, 73, 89, 72, [...] and so on.

Date: 4/3/2017, 2/21/2018  [...] and so on.

 

My problem is that i do have dozens of different ages and dates.  I do want to obtain something like this:

Filter active:

Sex: Male.

Age min: 56

Age max: 90

fDate: 4/3/2017

lDate: 12/31/2017

 

Or if possible: 

Filter active:

Sex: Male.

Age: 56 to 90.

Date: 4/3/2017 to 12/31/2017.

 

May someone help me?

 

Thanks a lot,

Angel

Highlighted
javi0unavailabl Regular Visitor
Regular Visitor

Re: Show active filters.

@areymejias For that, you can do something like this:

 

[...]
&IF(ISFILTERED(event[age])
;UNICHAR(10)&"Ages: "& MIN(event[age]) & " - " & MAX(event[age]);", "))
[...]

Tell me if this is what you are looking for.

 

Regards.

 

 

areymejias Frequent Visitor
Frequent Visitor

Re: Show active filters.

@javi0unavailabl Thanks a lot for the fast response and sorry for the dealy but i was out of office.

 

I did tried hundreds of changes before i post this, your sentence "should" do exactly what i am looking for but it does not work, it seems to appears and error with & I have tried, just with MIN, or with MAX, with less text, with more parenthesis and hundreds of combinations, but it does not work, i am out of ideas. If you have any i would love to hear them.

 

Thanks in advance,

Angel

javi0unavailabl Regular Visitor
Regular Visitor

Re: Show active filters.

I don't know... you said about syntax error with &...    if there is nothing before the formula above posted, then remove the first & in "

&IF(ISFILTERED [...]

", & it's used to concatenate text

 

Could you post the error you are getting?

 

 

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (2,446)