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
Anonymous
Not applicable

Counting Total excluding Missing Values

Good Afternoon

 

I need some help with a measure please.

 

In my data i have the below:

 

EventCode,  Month,  Person Count

1,                    1 ,          

1,                    2,                 26

1,                    3,                 35

 

Code is replicated each month, however there is not a count for each month. What i need to do is count the total number of each code where there is a count.

So in the example above the count of code would be 2.

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Num rows =
COUNTROWS ( FILTER ( 'Table', 'Table'[Person Count] > 1 ) )

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you, that has worked it was so much simpler than i was expecting it to be.

johnt75
Super User
Super User

Try

Num rows =
COUNTROWS ( FILTER ( 'Table', 'Table'[Person Count] > 1 ) )

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.