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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
third_hicana
Helper IV
Helper IV

Calculate the number of unique values in a column and no value in another column

Hi Everyone!
Asking for your help in DAX. 

 

How can I calculate the number of departments with no FTE value but also check that no projects have no FTE value?

So my desired result is 1 because Department 2 has no value in Project B and Project A.

There's only 1 department that has no FTE value from all of the projects. Basically, I want to check how many unique departments that have no FTE value across all projects.

Thank you.

- Third

third_hicana_0-1708779182160.png

 

1 ACCEPTED SOLUTION
StrategicSavvy
Resolver II
Resolver II

Hi, 

 

I think this formula should help you:

 

Distinct Count =
VAR __Table = FILTER(
    SUMMARIZE('Table',
    'Table'[Department],
    'Table'[Project],
    "@FTE",
    CALCULATE(
        SUM('Table'[FTE]),
        ALLEXCEPT('Table','Table'[Department])
        )
        ),
        [@FTE] = BLANK()
        )
RETURN
CALCULATE(DISTINCTCOUNT('Table'[Department]), __Table)
Distinct count Projects Departments.png
I added one more department (6) with one project non-blank to proof the formula. 
 
Hope it helps!

View solution in original post

2 REPLIES 2
third_hicana
Helper IV
Helper IV

@StrategicSavvy 

Thank you very much for your help!

StrategicSavvy
Resolver II
Resolver II

Hi, 

 

I think this formula should help you:

 

Distinct Count =
VAR __Table = FILTER(
    SUMMARIZE('Table',
    'Table'[Department],
    'Table'[Project],
    "@FTE",
    CALCULATE(
        SUM('Table'[FTE]),
        ALLEXCEPT('Table','Table'[Department])
        )
        ),
        [@FTE] = BLANK()
        )
RETURN
CALCULATE(DISTINCTCOUNT('Table'[Department]), __Table)
Distinct count Projects Departments.png
I added one more department (6) with one project non-blank to proof the formula. 
 
Hope it helps!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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