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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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")

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")

Awesome,  that works out perfectly!  Thanks so much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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