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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
VincenzoDelaVeg
New Member

Creating a Filter to Display All Client Values Based on a Specific Value in PowerBI

This is my first post in the PowerBI community, so apologies if the format isn't perfect. As far as I know, this question hasn't been posted yet.

 

I have a table with client IDs, and each client has specific values. I would like to create a filter that, when I select "Value = B", shows me a table containing the client ID and the values for all clients who have any mention of value B.

 

For example, it would show all values for Clients 1, 2, and 3, but not for Client 4, since Client 4 doesn't have a value of B. I would ideally have a slicer where I can choose 4, so this will allow me to change the value that I need (I have around 500 choices in my table).

 

If I were to write this in SQL, it would look something like the query below. Despite my best efforts, I just can't figure out how to achieve this in PowerBI.

 

 

 

 

select ClientId, Value
from table
where clientid in (select * from table where Value = B)

 

 

 

 

This is the table that I have:

ClientidValue
1B
1C
1D
1F
1G
1I
1J
2B
2E
2F
2H
2I
2J
3A
3B
3D
3F
3H
3J
4A
4C
4E
4G
4I
4J

 

And this is what I am after (ClientId 4 is therefore gone because it does not have the value B)

ClientidValue
1B
1C
1D
1F
1G
1I
1J
2B
2E
2F
2H
2I
2J
3A
3B
3D
3F
3H
3J

 

 

My method so far
I create a copy of the table in DAX and making sure I have distinct values.

 

 

 

 

 

 NewTable = DISTINCT(SELECTCOLUMNS('Table', "Value", 'Table'[Value], "Clientid", 'Table'[ClientId]))

 

 

 

 

 

Then I create a measure that reads from NewTable when select B, and attemps to export the list of ClientID

 

 

 

 

 

Filtered_ClientID = 
CALCULATETABLE (
    DISTINCT('Table'[ClientId]),
    FILTER (
        'Table',
        'Table'[Value] IN VALUES ( 'NewTable'[Value] )
    )
)

 

 

 

 

 

The problem is that (1) I feel like I'm going in circle with my problem and (2) This Filtered_ClientID is throwing an error that there are multple value per column, which is exactly what I am trying to extract. 

 

Thanks a lot! By the way, how come I cannot insert a PowerBI file into the chat... isnt it the PowerBI forum? /s

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have answered a similar question in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1720921747726.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

I have answered a similar question in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1720921747726.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.