Forum Discussion
chrisgill
3 years agoFrequent Visitor
Distinct Count using multiple row context filters
I'm trying to create a calculated column in a table that returns the count of all rows in a table that match multiple criteria from the current row. Something like this: ContractType Termcode...
- 3 years ago
chrisgill Try:
Column = VAR __Termcode = [Termcode] VAR __PersonID = [PersonID] RETURN COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table6',[Termcode] = __Termcode && [PersonID] = __PersonID),"ContractType",[ContractType])))
Greg_Deckler
3 years agoCommunity Champion
chrisgill Try:
Column =
VAR __Termcode = [Termcode]
VAR __PersonID = [PersonID]
RETURN
COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table6',[Termcode] = __Termcode && [PersonID] = __PersonID),"ContractType",[ContractType])))