Forum Discussion

DANNYBLACK's avatar
DANNYBLACK
New Member
4 years ago
Solved

COUNTROWS - Not counting as expected.

Hi I am pulling my hair out with this... (FYI new to PowerBI) I am trying to count the number of rows that have a value where RED - I am expecting the measure to return 6 but it is doing a SUM rath...
  • v-kkf-msft's avatar
    4 years ago

    Hi DANNYBLACK ,

     

    Please try the following formula:

     

    Measure = 
    COUNTX ( FILTER ( VALUES ( 'Page 1'[Subcategory] ), [RED] > 0 ), [RED] )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.