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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
anmolmalviya05
Solution Sage
Solution Sage

How to apply additional filter on a visual

Hi Everyone, I have a requirement in which i have to apply filter on name field on a table visual,

Presently I only have 4 names available in the name column, I want to apply filters of 10 names such that if any data comes in future related to them then it will get filter out.

I tried to manually add the name by switching the basic filtering to advance filtering but it's only allowing me to add limited number of names.

Is there any other possible way?

1 ACCEPTED SOLUTION

Hi @anmolmalviya05 ,

Thanks for amitchandak's reply!
And @anmolmalviya05 , you can try this:
Here is my sample data:

vjunyantmsft_0-1726120453598.png

You need to add another table with all 10 names in it:

vjunyantmsft_1-1726120486648.png
vjunyantmsft_2-1726120494011.png

Then use this DAX to create a measure:

Measure = 
IF(
    MAX('Table'[Name]) IN VALUES('#10'[#10]),
    1,
    0
)

Make the settings as shown in the following figure:

vjunyantmsft_3-1726120601440.png

vjunyantmsft_4-1726120623110.png

And the final output is as below:

vjunyantmsft_5-1726120696842.png


Best Regards,
Dino Tao
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

3 REPLIES 3
amitchandak
Super User
Super User

@anmolmalviya05 , You can check if the preselected slicer can help. As of now, we can not default value of the slicer using measures

https://appsource.microsoft.com/en-us/product/power-bi-visuals/insiderscoop1611244107840.powerbi_cus...

Hi @amitchandak, Thanks for your reply,

I want to apply this using filter option in filter pane.

I have attached a screenshot for reference, 

anmolmalviya05_0-1726030648583.png

Here I'm able to add only two values other than the value available in dataset. But i want to add 10 such values. 

Approach I tried: First i selected all tha values available in dataset from basic filtering, then switched to advance filtering and replaced the existing name, but this is possible only for the number of names present in the data, i.e in this case i can only add 4 names, but i want to add upto 10 names.

Hi @anmolmalviya05 ,

Thanks for amitchandak's reply!
And @anmolmalviya05 , you can try this:
Here is my sample data:

vjunyantmsft_0-1726120453598.png

You need to add another table with all 10 names in it:

vjunyantmsft_1-1726120486648.png
vjunyantmsft_2-1726120494011.png

Then use this DAX to create a measure:

Measure = 
IF(
    MAX('Table'[Name]) IN VALUES('#10'[#10]),
    1,
    0
)

Make the settings as shown in the following figure:

vjunyantmsft_3-1726120601440.png

vjunyantmsft_4-1726120623110.png

And the final output is as below:

vjunyantmsft_5-1726120696842.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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