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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MickeLearnPBI
Helper I
Helper I

Unique combination av values

I would like to see unique combination of number of people working 1 or more departments. For example Matt, he works on both Sales and Production, that combination has no other = result 1 staff. Would I also mark Consultat (+Sales and Production), then there is no staff with that combination.

Is it possible to create some DAX to get the desired result?

 

PersonIDFirstNameLastNameBusinessUnitDepartment

556677MattOlsenSalesDepartment 1
556677MattOlsenProductionDepartment 1
775566JenniGrantSalesDepartment 1
445566DanielLaRussoConsultantDepartment 1
994455SarahConnorSalesDepartment 1
994455SarahConnorSalesDepartment 2
1122JohnConnorSalesDepartment 1
2 REPLIES 2
Anonymous
Not applicable

Hi @MickeLearnPBI 

 

First, we need to create a calculated table that consolidates the unique combinations of PersonID and Department.

UniqueCombinations = 
SUMMARIZE(
    'Table', 
    'Table'[PersonID], 
    'Table'[Department], 
    "Count", COUNTROWS('Table')
)

 

 

Next, we create a measure to count the unique combinations.

Count of Unique Combinations = 
CALCULATE(
    DISTINCTCOUNT('UniqueCombinations'[PersonID]), 
    FILTER(
        'UniqueCombinations', 
        'UniqueCombinations'[Count] > 1
    )
)

vjialongymsft_0-1716950645637.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I tried that but it didn't seem to work. Let's say the number for the measure is 0 from the start, but when I then select the text Sales and Production with CTRL, then the number should show 1.
And that's because it's only Matt who works on this combination that I marked in the report.

Hope you understand what I mean?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.