Forum Discussion
dlgardo
9 years agoRegular Visitor
count numeric column cells and exclude certain value
I would like to count the number of cells in a numeric column but exclude if the value is 0. Seems like this should be fairly easy, but since I am new to PowerBI, I would appreciate any assistance! ...
- 9 years ago
Yep that's another way of doing the same thing...
the only thing I'll change is add the table name as per Rob Collie's post here
EDIT: Sorry the post was actually by MattAllington on Rob's site
- Column reference: Table[Column Name]
- Measure Reference: [measure name]
But that's just a suggestion it should work regardless :smileyhappy:
Count Column = COUNTX ( FILTER ('Table', 'Table'[Column] <> 0) , 'Table'[Column] )
alanhodgson
9 years agoSolution Supplier
Hey dlgardo,
Sean's answer works for me. This also seems to work:
Count Column = COUNTX(FILTER('Table', 'Table'['Column'] <> 0),[Column])Sean can you confirm?
Thanks,
Alan
Sean
9 years agoCommunity Champion
Yep that's another way of doing the same thing...
the only thing I'll change is add the table name as per Rob Collie's post here
EDIT: Sorry the post was actually by MattAllington on Rob's site
- Column reference: Table[Column Name]
- Measure Reference: [measure name]
But that's just a suggestion it should work regardless :smileyhappy:
Count Column = COUNTX ( FILTER ('Table', 'Table'[Column] <> 0) , 'Table'[Column] )