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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Counting Blanks Distinct To An ID

Hi everyone,

 

I am working on a timesheet data set and as such every individual has multiple entries.

 

I am counting blanks in a column and my simple countblanks measure is returning me multiple blanks per invididual as they have entered multiple timesheets.

 

I am hoping to do a single count of the blank per individual, so for example if five time sheets have been entered by that individual and i have a blank i am counting, it would return 1 as the result, not 5.

1 ACCEPTED SOLUTION
Adamboer
Responsive Resident
Responsive Resident

 

To achieve a single count of the blank per individual, you can modify your measure to first group the data by individual and then count the number of distinct individuals with at least one blank timesheet entry. Here's an example DAX formula you can use:

 
Distinct Count of Blank Time Sheets =
DISTINCTCOUNT(
FILTER(
SUMMARIZE('Table', 'Table'[Individual]),
CALCULATE(
COUNTBLANK('Table'[Time Sheet Column]),
ALLEXCEPT('Table', 'Table'[Individual])
) > 0
)
)

In this formula, replace 'Table' with the name of your timesheet table, 'Individual' with the name of the column that identifies each individual, and 'Time Sheet Column' with the name of the column containing the timesheet entries.

The formula first creates a summary table that groups the data by individual, and then calculates the number of distinct individuals with at least one blank timesheet entry. The ALLEXCEPT function is used to remove any filters on the individual column, allowing the count to consider all timesheet entries for each individual.



View solution in original post

1 REPLY 1
Adamboer
Responsive Resident
Responsive Resident

 

To achieve a single count of the blank per individual, you can modify your measure to first group the data by individual and then count the number of distinct individuals with at least one blank timesheet entry. Here's an example DAX formula you can use:

 
Distinct Count of Blank Time Sheets =
DISTINCTCOUNT(
FILTER(
SUMMARIZE('Table', 'Table'[Individual]),
CALCULATE(
COUNTBLANK('Table'[Time Sheet Column]),
ALLEXCEPT('Table', 'Table'[Individual])
) > 0
)
)

In this formula, replace 'Table' with the name of your timesheet table, 'Individual' with the name of the column that identifies each individual, and 'Time Sheet Column' with the name of the column containing the timesheet entries.

The formula first creates a summary table that groups the data by individual, and then calculates the number of distinct individuals with at least one blank timesheet entry. The ALLEXCEPT function is used to remove any filters on the individual column, allowing the count to consider all timesheet entries for each individual.



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.