Forum Discussion
Johnathon_S
8 years agoRegular Visitor
Count Duplicate Occurrences
I have been through tons of this forum searching for the answer to this. It seems like a common question, but I am unable to generate the field that I'd like. In the PowerBI query editor, or in the R...
Eric_Zhang
8 years agoMicrosoft Employee
For the first output, you just need a measure as below.
Measure = COUNTROWS(yourTable)
As to the second, you need a index column and a measure as below
Measure 2 = CALCULATE(COUNTA(yourTable[Person]),ALLEXCEPT(yourTable,yourTable[Person]))
See the attached pbix file.
Johnathon_S
8 years agoRegular Visitor
Neither of those worked. I have large amounts of data in these tables, including many many columns. I want to count the occurrences that a name shows up in one column.
Measure = COUNTROWS(myTable) does not have the behavior in your screenshot. Rather, the measure makes a new column with a value of "1" in every row.
Solution two
Measure 2 = CALCULATE(COUNTA(yourTable[Person]),ALLEXCEPT(yourTable,yourTable[Person]))
Creates massive amounts of unneeded rows.