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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Judy-0606
Regular Visitor

Identify duplicates and apply the category name for them

Hello, 

 

I have a table containing the duplicate materials that are stocked in different stores.   I need to identify duplicate materials and if this material is stocked at store 1 as well as the rest of the stores, which will be categorized as "Universal".   If the material is only stocked at stores except store 1, which will be categorized as "branch".

 

Current Table

StoreMaterial
1127
2127
3127
4127
5127
2128
3128
4128
5128

 

what I want to achieve is as below.

StoreMaterialType
1127Universal
2127Universal
3127Universal
4127Universal
5127Universal
2128Branch
3128Branch
4128Branch
5128Branch

 

Thanks 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Judy-0606 , try a new column

new column =
var _cnt = countx(filter(Table, [Material] = earlier([Material]) && [Store] =1), [Material])
return
if(isblank(_cnt) , "Branch", "Universal")

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

2 REPLIES 2
amitchandak
Super User
Super User

@Judy-0606 , try a new column

new column =
var _cnt = countx(filter(Table, [Material] = earlier([Material]) && [Store] =1), [Material])
return
if(isblank(_cnt) , "Branch", "Universal")

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

Awesome,  that works out perfectly!  Thanks so much!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.