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
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])))

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])))

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

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.