Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculate Count formula

Hello

 

Power BI novice user here. I'm trying to use the calculate(count...) formula to work out the total number of results that are >=5 and <=7 (i.e. all 5's, 6's, 7's). The dataset has '99' as a response (essentially 'Not sure' if converted as 'string') and I want to exclude these as part of the calculation.

 

Hoping someone can assist.

 

Thanks

  • decarsul's avatar
    decarsul
    5 years ago

    CALCULATE(COUNT('Report1'[Educate employees]),'Report1'[Educate employees]>=5 && 'Report1'[Educate employees]<=7)

     

    the && functions as an AND when turning to SQL, which means the filter has to pass BOTH criteria

11 Replies

  • Not entirely sure what you mean, but since i'm searching for help myself, i figured maybe i can assist in this.

     

    Have you tried something like:

     

    Calculate(count(ID);[result] >= 5 && result <=7)?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I don't think I understand your response, but I'm unable to make that work...

      • decarsul's avatar
        decarsul
        Icon for Helper V rankHelper V

        Can you give me / us a rough sketch of how your table looks?

        Can be fictious data.