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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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