Forum Discussion
Anonymous
5 years agoNot applicable
Count zero but not blank
Hi everyone, I have created a measure where I count all sales that have been sold with 0 discount. But my problem is that it also counts all the blank fields in the specific column. Below is my me...
- 5 years ago
Hello @seryil ,
You must use the strictly equal sign, so your measure should be:
Measure = CALCULATE([Total Sales], Sales[Discount] == 0)check the explanation at the following link:
amitchandak
5 years agoSuper User
Anonymous , Try
CALCULATE([Total Sales], Filter(Sales,not(isblank(Sales[Discount] )) && Sales[Discount] = 0))
or
CALCULATE([Total Sales], coalesce(Sales[Discount],-1) = 0)