Forum Discussion
zenton
4 years agoHelper II
Count from summarised row count
Hi, I have a measure to Countrows of summarized data. Results in the table below. I need a measure to show count of the rows that equal 18. So the result should be 4 as per table below Measure 3 ...
tamerj1
4 years agoCommunity Champion
zenton
I hope this one works
Complete Task Count =
VAR SummaryTable =
ADDCOLUMNS (
SUMMARIZE (
Labware,
Labware[Analyte Name],
Labware[LIMS Text ID],
Labware[Calendar Date]
),
"@Count", COUNTROWS ( Labware )
)
VAR MaxCount =
MAXX ( SummaryTable, [@Count] )
RETURN
SUMX ( SummaryTable, IF ( [@Count] = MaxCount, 1, 0 ) )- zenton4 years agoHelper II
tamerj1 The Measure gives me a result of 90. This is the total count of all values in this table
Thanks, Rodney
- tamerj14 years agoCommunity Champion
zenton
I guess one mistake. Try thisComplete Task Count = VAR SummaryTable = ADDCOLUMNS ( SUMMARIZE ( Labware, Labware[Analyte Name], Labware[LIMS Text ID], Labware[Calendar Date] ), "@Count", CALCULATE ( COUNTROWS ( Labware ) ) ) VAR MaxCount = MAXX ( SummaryTable, [@Count] ) RETURN SUMX ( SummaryTable, IF ( [@Count] = MaxCount, 1, 0 ) )