Forum Discussion
ReadTheIron
Helper III
3 years agoMeasure to count repeats
I have a table of equipment failures. I want to count the number of pieces of equipment that failed more than once in a given timeframe (driven by user/slider on page). My data looks something li...
- 3 years ago
Please try this measure expression. Replace Failures with your actual table name.
Equipment MT1 Failures = VAR tSummary = SUMMARIZE ( Failures, Failures[EquipmentName], "cCount", COUNT ( Failures[EquipmentName] ) ) RETURN COUNTROWS ( FILTER ( tSummary, [cCount] > 1 ) )Pat
grantsamborn
Solution Sage
3 years agoHi ReadTheIron
Does this help?
Repeats TrueFalse =
VAR _count = COUNT( Table1[EquipmentName] )
VAR _distinct = DISTINCTCOUNT( Table1[EquipmentName] )
VAR _temp = _count - _distinct
VAR _result =
IF(
_temp > 0,
TRUE(),
FALSE()
)
RETURN
_result
- ReadTheIron3 years ago
Helper III
That work well for telling me whether an individual piece of equipment failed >1 or not, but I can't seem to use it as a filter telling me how many pieces of equipment in an area failed >1.