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

Count and Group by - Urgent help

This is my data, I want to prepare a report to show the number of students accesses to the course. I have a day access a data field which I can use to count the number of days access to the course by each student and if I use Group by it will count the blank or null value in the table. How can I avoid counting blank or null and also display 0 for null or blank in the table?

 

User ID    Day Access

kh006012-Apr-21
kh007112-Apr-21
kh006004-Mar-21
kh008904-Mar-21
kh006003-Mar-21
kh008906-Mar-21
kh007129-Mar-21
kh006028-Mar-21
kh007128-Mar-21
kh006031-Mar-21
kh0060 
kh0071 
kh0089 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kh0050 , usally when count, it should not count blank

 

count(Table[Day Access])

 

or can create like

calculate(count(Table[Day Access]), not(isblank(Table[Day Access])))

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@kh0050 , usally when count, it should not count blank

 

count(Table[Day Access])

 

or can create like

calculate(count(Table[Day Access]), not(isblank(Table[Day Access])))

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

Thank you. It is working perfectly. Is there a way blank or null can be replaced by 0 in my tables?

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.