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
anktaggrwl
Helper II
Helper II

Measure to show Duplicate occurences of the same combination of two columns

Is there a quick/easy way to write a measure that shows duplicate occurrences of the same combination of values from two columns?

 

i.e. I have the following table:

 

 Account Team Member Role
AJohnService
AMichaelSales
ASusanOperations
AMarySales
BJohnService
BJoeService
BMarySales
BAlexisSales
CDavidService
CJohnOperations
CSusanService
DMichaelSales
DKeith

Service

 

And want a table visual in PBI to show something like this:

 

 Account Role RoleCount
AService1
ASales2
AOperations1
BService2
BSales2
CService2
COperations1
DSales1
DService1

 

I would then bake into the measure where RoleCount =1 return Blank, else, give me the number of occurences of the same values in Role under any given value of Account...

 

Doing this in M is not an option, and I'd prefer it to be a measure, since I have 400k accounts, and 38 possible roles - so would want users to only focus/filter via slicer accounts on which he/she is attached.

 

Thanks!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@anktaggrwl

 

Hi, try with this in a table visual with Account and Role:

 

Measure =
IF (
    DISTINCTCOUNT ( Table1[ Team Member] ) = 1;
    BLANK ();
    DISTINCTCOUNT ( Table1[ Team Member] )
)

Regards

 

Victor




Lima - Peru

View solution in original post

1 REPLY 1
Vvelarde
Community Champion
Community Champion

@anktaggrwl

 

Hi, try with this in a table visual with Account and Role:

 

Measure =
IF (
    DISTINCTCOUNT ( Table1[ Team Member] ) = 1;
    BLANK ();
    DISTINCTCOUNT ( Table1[ Team Member] )
)

Regards

 

Victor




Lima - Peru

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.