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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Find Duplicate Count of related Table

Here's the situation,

 

I have two tables with a 1 to Many relationship: Location and Asset.  I'm looking to find and flag TRUE or FALSE locations that have multiple Assets of the same Size and of the same Material.  See Below for table examples.  

 

Asset Table

 

Asset IDLocation NumberSizeMaterial
223412341Wood
223512341Wood
223612342Wood
223712354Carpet
223812361Carpet
223912361Wood
224012363Carpet
224112371Wood

 

Location Table

 

Location NumberRelated to Multiple Assets of the same Type
1234TRUE
1235FALSE
1236FALSE
1237FALSE
1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @HansTheEnforcer 

I would propose creating a calculated column like this in Location:

 

Related to Multiple Assets of the same Type =
CALCULATE (
    MAXX (
        SUMMARIZE ( Asset, Asset[Material], Asset[Size] ),
        CALCULATE ( COUNTROWS ( Asset ) )
    )
) > 1

 

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

3 REPLIES 3
OwenAuger
Super User
Super User

Hi @HansTheEnforcer 

I would propose creating a calculated column like this in Location:

 

Related to Multiple Assets of the same Type =
CALCULATE (
    MAXX (
        SUMMARIZE ( Asset, Asset[Material], Asset[Size] ),
        CALCULATE ( COUNTROWS ( Asset ) )
    )
) > 1

 

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

This worked perfectly!  Thank you!

VasTg
Memorable Member
Memorable Member

@HansTheEnforcer 

 

Try this as a calculated column in Location Table.

 

Column =
VAR A =
    RELATEDTABLE ( 'Asset Table' )
VAR SIZE_CNT =
    CALCULATE ( DISTINCTCOUNT ( 'Asset Table'[Size] ), A )
VAR MATERIAL_CNT =
    CALCULATE ( DISTINCTCOUNT ( 'Asset Table'[Material] ), A )
RETURN
    IF ( SIZE_CNT > 1, FALSE (), IF ( MATERIAL_CNT > 1, FALSE (), TRUE () ) )

 

If this helps, mark it as a solution.

Kudos are nice too

Connect on LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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