cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bheepatel Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Iamnvt Member
Member

Re: Row aggregation - count blanks across rows

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 Member
Member

Re: Row aggregation - count blanks across rows

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 228 members 2,280 guests
Please welcome our newest community members: