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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Well-Mart
Regular Visitor

Filter a table based on a temporary filtered other table

Hello, everyone!
I need some help filtering tables that are not directly related.

I have this reference TABLE A - called Items. All my items are there, and the "key" is the Item Number(ArtNr);

Another TABLE B - called Orders, the "key" is also ItemNumber, and I have a visual Table to show me how many pieces per Order Number (OrderNr), based on each Item Number;

Finally, I have a third TABLE C - called Purchase (orders); the key also is ItemNumber as well, but it shows how many Purchase Order Numbers (BestNr) for each Item Number;

The problem is when I filter an Order Number (OrderNr) in [B] that has multiple Item Numbers (ArtNr), I wish it could filter the table [C]  by the same Item Numbers (ArtNr) that are shown in table [B]; the Order Number is a slicer for the table [B]

 

WellMart_0-1713807617247.png

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Well-Mart 

place the following measure in the filter pane of the prachse table visual, select "is not blank" then apply the filter 

FilterMeasure =
CALCULATE (
COUNTROWS ( Purchase ),
KEEPFILTERS ( TREATAS ( VALUES ( Orders[AtNr] ), Purchase[ArtNr] ) )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Well-Mart 

place the following measure in the filter pane of the prachse table visual, select "is not blank" then apply the filter 

FilterMeasure =
CALCULATE (
COUNTROWS ( Purchase ),
KEEPFILTERS ( TREATAS ( VALUES ( Orders[AtNr] ), Purchase[ArtNr] ) )
)

Thank you, @tamerj1 ! It is working; the measure is counting when the Item in Purchase appears in the Orders table, then I filtered the Purchase table for not blank, and it filtered. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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