cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Community Champion
Community Champion

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

@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
Highlighted
Community Champion
Community Champion

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

@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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors