Forum Discussion

strikw's avatar
strikw
Helper I
8 years ago
Solved

Return values greater than zero by making a count

Hello,

I'm having trouble returning the data in one measure, I want the measure to return me the data in a column that is greater than 0.

Ex: Table 1, cololuna1:
2
1
0
2
1
0


I want to count values that are greater than 0, that in this example the result is 4. And it has to be in a measure.

Thank you.

  • Hi strikw,

     

    You need to have something like this:

     

    Count = Calculate ( Count (Table [Colum]), Table [Colum] > 0)

    Regards,

    MFelix

4 Replies

  • Hi strikw,

     

    You need to have something like this:

     

    Count = Calculate ( Count (Table [Colum]), Table [Colum] > 0)

    Regards,

    MFelix

    • strikw's avatar
      strikw
      Helper I

      Thank you very much,

      It worked perfectly.

      Have a great day.

      Att, Paulo Dantas.

  • Hello,

    I'm having trouble returning the data in one measure, I want the measure to return me the data in a column that is greater than 0.

    Ex: Table 1, cololuna1:
    2
    1
    0
    2
    1
    0


    I want to count values that are greater than 0, that in this example the result is 4. And it has to be in a measure.

    Thank you.

    • jthomson's avatar
      jthomson
      Solution Sage

      Does CALCULATE(COUNTROWS(yourtable), yourcolumn>0) return the result you want?