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
Anonymous
Not applicable

Count non-blanks in Matrix

Hi all!

 

I've got this matrix based on Employees. Each employee can be in charge of multiple businesses, and each business has it's own Risk-level. 

nonblanksmatrix.PNG

 

Notice that Person B has a blank cell. I want the Risk-column to specificy how many non-blanks each Person has.

When the matrix has been collapsed on Employee, it should read:

Person A | 2

Person B | 1

Person C | 2

 

Is this possible?

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

You can use the below Dax Expression.

Risk m = 
IF( ISFILTERED(YourTable[Business]), MAX(YourTable[Risk]),  DISTINCTCOUNTNOBLANK(YourTable[Risk]))

Regards,
Mariusz

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

View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Can you provide a data sample?

Many Thanks

Mariusz

Anonymous
Not applicable

Employee, Business, Risk

Person A, Business X, High

Person A, Business Y, Low

Person B, Business W,,

Person B, Business O, Medium

 

 

Comma error, fixed.

Hi @Anonymous 

 

You can use the below Dax Expression.

Risk m = 
IF( ISFILTERED(YourTable[Business]), MAX(YourTable[Risk]),  DISTINCTCOUNTNOBLANK(YourTable[Risk]))

Regards,
Mariusz

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

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.

Top Solution Authors