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
Dan_Wis
Frequent Visitor

Count Blanks related to different table

Hi,

 

How to count percentage of blank values having:

 

1. In one (main) table I have, apart from other coulmns: "ID". The table has appx 30 k rows.

 

IDCountry
1UK
2DE
3SE
4UK
5NO
6UK
7BE
8ES
9SE
10DK
11DE
12ES

 

2. Table2 with: single values in ID column only with non blank entries in Date column - say 6k rows

 

IDDate
101/05/2020
313/04/2019
815/06/2019
916/08/2020

 

Both tables are connected as one-to-many   Table2-MainTable

 

Based on that criteria I'm showing a bar chart with number of blank Dates, counting MainTable(ID), Axis MainTable(Country), having in filter Table2(Date) = (Blank)

 

How to count percentage of blanks, having in denominator a number of rows from MainTable? (4/12 = 33%)

 

Thank you in advance for your support on this.

1 ACCEPTED SOLUTION

@amitchandak  I've just found a way:

 

M1 = 1-DIVIDE(CALCULATE(COUNTROWS(Table),ISBLANK('Table2'[Date])),COUNTROWS(Table))
 
thanks!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Dan_Wis , Try measures like

M1 = count(Table2[Date])

Blank Dates = sumx(values(Table[ID]), if(isblank(M1]), 1,0))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  I've just found a way:

 

M1 = 1-DIVIDE(CALCULATE(COUNTROWS(Table),ISBLANK('Table2'[Date])),COUNTROWS(Table))
 
thanks!

THanks @amitchandak!  this is giving me a 0, as there are no blanks in table 2.

Also I would need to use other filters - seems M1 measure is not allowing to apply filters.

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.