Forum Discussion

McCow's avatar
McCow
Icon for Resolver III rankResolver III
8 years ago
Solved

COUNTROWS is BLANK

Hello! How it is possible, that calculated column with such DAX query return blank values?     Qnty = CALCULATE(COUNTROWS('Table');ALLEXCEPT('Table';Table[ID])) Error samplle is here And here i...
  • Anonymous's avatar
    Anonymous
    8 years ago

    It calculates as expected. But it can be confusing if you expect 0 for no records (as in SQL)

     

    Whenever there are no rows to aggregate, the function returns a blank. However, if there are rows, but none of them meet the specified criteria, the function returns 0. Microsoft Excel also returns a zero if no rows are found that meet the conditions.

     

    https://msdn.microsoft.com/en-us/query-bi/dax/countrows-function-dax?f=255&MSPPError=-2147217396