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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
fcarvalho
Advocate I
Advocate I

Filter a Client and shows all Client Sales from a group

Hi, 

I need to filter a Client and then show all sales from all clients from the same group as the selected, and I'm getting stucked with that.

 

ClientsGroupsSales
Client1XPTO12312
Client2ZZZZ4324
Client4ZZZZ435
Client3XPTO2131

 

 

Example:

 

When I select Client1, shows the sales of Client1 and Client3, because they are from the same group (XPTO), or if I filter Client4, shows only Client4 and Client2 sales.

I need this filtering way, instead of filtering the group, because in my embedded solution i only can get the client parameter.

 

Client1 selected (exemple):

 

Shows a Bar Chart like that

 

Client 1 ------ 12312

Client 3 ---- 2131

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@fcarvalho , a measure like this

 

measure =
var _tab = summarize(filter('Table', 'Table'[Client] in allselected('Table'[Client])),'Table'[Groups])

return
calculate(sum(Table[Sales], filter(all(Table), Table[Groups] in _tab))

 

 

But this will work better if the client and group is an independent table

 

measure =
var _tab = summarize(filter('Client', 'Client'[Client] in allselected('Client'[Client])),'Client'[Groups])

return
calculate(sum(Table[Sales], filter(all(Table), Table[Groups] in _tab))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@fcarvalho , a measure like this

 

measure =
var _tab = summarize(filter('Table', 'Table'[Client] in allselected('Table'[Client])),'Table'[Groups])

return
calculate(sum(Table[Sales], filter(all(Table), Table[Groups] in _tab))

 

 

But this will work better if the client and group is an independent table

 

measure =
var _tab = summarize(filter('Client', 'Client'[Client] in allselected('Client'[Client])),'Client'[Groups])

return
calculate(sum(Table[Sales], filter(all(Table), Table[Groups] in _tab))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.