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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bheepatel
Resolver IV
Resolver IV

Row aggregation - count blanks across rows

Hi 

I have a table where the first column is a unique Company ID and the remaining columns are metrics (Metric 1, Metric 2, Metric 3 etc.). For each row (i.e. Company ID) I want to determine how many blank metrics I have. Is there a way to count blanks across a row in Power BI? So if for Company1, Metrics 1 and 3 are blank then the count would be 2.

 

Thanks in advance!

1 ACCEPTED SOLUTION
Iamnvt
Continued Contributor
Continued Contributor

hi,

 

you can try this Measure:

Count blank = 
VAR
Metric1blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 1] = BLANK()))
VAR
Metric2blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 2] = BLANK()))
VAR
Metric3blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 3] = BLANK()))
RETURN
Metric1blank + Metric2blank + Metric3blank

here is PBI file:

https://1drv.ms/u/s!Aps8poidQa5zk6pynAIAUTgUSAV7EQ

View solution in original post

1 REPLY 1
Iamnvt
Continued Contributor
Continued Contributor

hi,

 

you can try this Measure:

Count blank = 
VAR
Metric1blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 1] = BLANK()))
VAR
Metric2blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 2] = BLANK()))
VAR
Metric3blank = 
CALCULATE(COUNT(Table1[Company ID]),
FILTER(VALUES(Table1[Company ID]), [Metric 3] = BLANK()))
RETURN
Metric1blank + Metric2blank + Metric3blank

here is PBI file:

https://1drv.ms/u/s!Aps8poidQa5zk6pynAIAUTgUSAV7EQ

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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