Forum Discussion

Viswa1127's avatar
Viswa1127
Frequent Visitor
4 years ago
Solved

Count values in a column

Hi All,

I am trying to count the values in one column in my table but it is counting blank values also. How to neglect blank values. Any ideas?

When i apply count it is counting blank values also. Thanks in advance!

 

  • Hi Viswa1127 ,

     

    Try using either of these:

    _option1 = DISTINCTCOUNTNOBLANK(yourTable[yourColumn])
    
    _option2 = COUNT(yourTable[yourColumn]) - COUNTBLANK(yourTable[yourColumn])

     

    Pete

4 Replies

  • Viswa1127's avatar
    Viswa1127
    Frequent Visitor

    Hi, How it is help in my current scenario? I just want the count of values in column whithout including the blanks!

     

  • Hi Viswa1127 ,

     

    Try using either of these:

    _option1 = DISTINCTCOUNTNOBLANK(yourTable[yourColumn])
    
    _option2 = COUNT(yourTable[yourColumn]) - COUNTBLANK(yourTable[yourColumn])

     

    Pete

    • Viswa1127's avatar
      Viswa1127
      Frequent Visitor

      BA_Pete ,
      Thanks alot first one I have tried. I am not aware of countblank() function it is solving my problem.