Forum Discussion

ali70's avatar
ali70
Frequent Visitor
4 years ago
Solved

Count

Hello guys,

I have a column in which data is TRUE/FALSE.

i want to count where =True or where =false.

Thank you so much for the help

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi ali70 ,

     

    Try this

    Count True = CALCULATE(COUNT('Table'[ID]),'Table'[T/F]=TRUE())
    Count False = CALCULATE(COUNT('Table'[ID]),'Table'[T/F]=FALSE())

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • ali70 , if it is boolean column

     

    True= countrows(filter(Table, Table[Column]))

     

    false= countrows(filter(Table,not( Table[Column])))

     

     

    True= countrows(filter(Table, Table[Column] = ""True"))

     

    false= countrows(filter(Table, Table[Column] ="False"))

    • ali70's avatar
      ali70
      Frequent Visitor

      Hello, unfortunately it is not working

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        ali70 

        maybe you can try to create two measures

        TRUE = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column1]=TRUE()))
        
        FALSE = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column1]=FALSE()))
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ali70 ,

     

    Try this

    Count True = CALCULATE(COUNT('Table'[ID]),'Table'[T/F]=TRUE())
    Count False = CALCULATE(COUNT('Table'[ID]),'Table'[T/F]=FALSE())

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.