cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dmitriy Frequent Visitor
Frequent Visitor

Show result in table only if it is filtered

I have a table of employers and 3 filters by name, second name and department.

I need to make my table to show results only if any of these filters are being active.

How I can do it?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Show result in table only if it is filtered

hi, @Dmitriy

You could use ISFILTERED to create a measure get your requirement.

 if name, second name and department are in your result visual?

If no, you could add a measure like this 

Measure = IF(ISFILTERED('Table'[name])=TRUE()||ISFILTERED('Table'[Second Name])=TRUE()||ISFILTERED('Table'[department])=TRUE(),1,2)

Then drag it into visual level filter and set filter is 1

1.JPG

 

If yes, you need add a new name, new second name and new department column and use them in visual

and then drag measure into visual level filter and set filter is 1

 

Result:

2.JPGbefore3.JPGafter

 

Best Regards,

Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Show result in table only if it is filtered

Should be able to use ISFILTERED: https://docs.microsoft.com/en-us/dax/isfiltered-function-dax


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

Community Support Team
Community Support Team

Re: Show result in table only if it is filtered

hi, @Dmitriy

You could use ISFILTERED to create a measure get your requirement.

 if name, second name and department are in your result visual?

If no, you could add a measure like this 

Measure = IF(ISFILTERED('Table'[name])=TRUE()||ISFILTERED('Table'[Second Name])=TRUE()||ISFILTERED('Table'[department])=TRUE(),1,2)

Then drag it into visual level filter and set filter is 1

1.JPG

 

If yes, you need add a new name, new second name and new department column and use them in visual

and then drag measure into visual level filter and set filter is 1

 

Result:

2.JPGbefore3.JPGafter

 

Best Regards,

Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Dmitriy Frequent Visitor
Frequent Visitor

Re: Show result in table only if it is filtered

great explanation, thank you

Leishka New Member
New Member

Re: Show result in table only if it is filtered

Hi,

Do you know how I can do this where if you only use one of the filters then the other columns stay blank in a table?

 

My report has a filtering page, and in the report pages I have a 'Selected FIlters' key which should be blank unless a filter has been used. The key is made up of several one column tables, one for each of the filters. I'd like them to only show a result if that field has been used as a filter. All of these fields  are in the same table.

(Courses)

(Qualifications Type)

(Field of Education)

 

So far I have been able to make all tables blank using ISFILTERED on one of my fields (Courses), but only this filter returns results in the tables. When I use the other filters nothing appears in any of the tables.

 

I have used the solution in this thread but only the (Courses) tables is blank and the others are now showing all thier data. When I use a filter all of the tables show filtered results, but I want the other tables to remain blank unless used.

 

Is there a way to do this?

 

Thanks

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 162 members 1,575 guests
Please welcome our newest community members: