Forum Discussion
Anonymous
4 years agoNot applicable
Count all non-zero or non-null values at a specific row
Hi all, I am very new to Power BI, but I am loving it already. I am using it to quickly represent and sift through a SQL database. We do a lot of sample testing and I want a way of indicating how...
Anonymous
4 years agoNot applicable
So with the below example at the most recent inspection only sample 2 remains. Sample 1 has failed at 40 months and sample 3 is missing. This is so we can summarize how many samples are still left in the field. A sample of 0 or null(blank) has been removed and no longer requires inspection.
| Sample | Months | Sample Rating (0-10) |
| 1 | 16 | 10 |
| 1 | 40 | 0 |
| 2 | 16 | 10 |
| 2 | 40 | 9 |
| 3 | 16 | 10 |
| 3 | 40 | null |
Samarth_18
Community Champion
4 years agoTry this:-
failed_sample =
calculate (count('table'[Sample]),
FILTER (
'table',
'table'[Sample Rating (0-10)] = 0
)
)missing_sample =
calculate (count('table'[Sample]),
FILTER (
'table',
'table'[Sample Rating (0-10)] = BLANK()
)
)