Forum Discussion
Anonymous
2 years agoNot applicable
Using not equal Blanks in DAX not returning correct total
Hello, I am using this DAX statement for a measure: n value = CALCULATE(COUNTROWS('Donor NPS'),FILTER('Donor NPS',[NPS]<>BLANK())) I then use "n value" as the Value in a matrix, with no rows...
- 2 years ago
The COUNT will iterate only on the specified column, while COUNTROWS considers the whole table. That can make the difference to narrow down the problem. Glad it worked for you 🙂
Anonymous
2 years agoNot applicable
Hi again,
I tried one other thing, your suggestion to use: n value1 = CALCULATE(COUNT(Donor NPS[NPS]), Donor NPS[NPS] <> BLANK()) except I took out the filter and now it matches what I had in the data table view. I'm thinking that the COUNT function maybe doesn't include blanks for a whole number field?
John
gmsamborn
Super User
2 years agoHi Anonymous
Maybe try replacing 'Donor NPS'[NPS] <> BLANK() with NOT ISBLANK( 'Donor NPS'[NPS] )