Forum Discussion
AndresOH
4 years agoFrequent Visitor
Count Rows When a Value occurs more than X times
Hi everyone! I'am trying to count the rows in a table only when the code of a customer appears more than "x" times. In this particular case the number is 2. Taking as an example the table below, th...
- 4 years ago
This is what I'm getting:
PaulDBrown
Community Champion
4 years agoTry:
More than 2 =
VAR _ CR = COUNTROWS (ALLEXCEPT (Table, Table[Customer]))
RETURN
COUNTROWS(FILTER(VALUES(Table[Customer]), _CR > 2))
- AndresOH4 years agoFrequent Visitor
Hi Paul! Thank you for your answer.
It didn't work, maybe it's my fault because I didn't put the whole information. Could you please see the table below?
Customer Country Type Month AAA USA 1 April AAA USA 1 April BBB Brazil 2 April DDD Germany 2 April AAA USA 1 June I need to make this calculation and at the same time filter the type of customer. If I choose type 1 it should count the rows of customer type 1 when it occurs more than 2 time. And also I need to be able to filter for an specific month (that will be select with a slicer)