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
Anonymous
Not applicable

Multiple filters using two tables DAX

I want to apply filters from two tables to count a numbe of items using DAX. Is this possible? In Excel would use vlookup and pivot.

 

From the two tables, I want to see how many items in the Vegetables category are sold.

 

Table 1:

 

     Item             Category

ApplesFruit
BananasFruit
BeltAccessory
BetrootVegetable
CandlesKitchenware
CarrotsVegetable
ChairLounge
EraserSchool Material
Foil WrapsKitchenware
Ice BlocksMisc
MicrowavesKitchenware
OrangesFruit
PeachesFruit
PencilsSchool Material
PhonesAccessory
ShirtClothing
ShoesClothing
SpinachVegetable
SpoonKitchenware
TableLounge
WatchAccessory

 

Table2:

     Items         Status

Apples Sold 
Bananas Instock 
Belt Instock 
Betroot Sold 
Candles Instock 
Carrots Instock 
Chair Instock 
Eraser Sold 
Foil Wraps Instock 
Ice Blocks Sold 
Microwaves Sold 
Oranges Instock 
Peaches Sold 
Pencils Sold 
Phones Instock 
Shirt Instock 
Shoes Sold 
Spinach Sold 
Spoon Sold 
Table Instock 
Watch Sold 
1 REPLY 1
amitchandak
Super User
Super User

In case the item table is having unique items. Join both tables on items.

 

Use a formula like

calculate(count(table2[item]),table2[sold]="sold",table1[Category]="Vegetable")

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

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
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.