Forum Discussion

chrisgill's avatar
chrisgill
Frequent Visitor
3 years ago
Solved

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...
  • Greg_Deckler's avatar
    3 years ago

    chrisgill Try:

    Column = 
        VAR __Termcode = [Termcode]
        VAR __PersonID = [PersonID]
    RETURN
        COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table6',[Termcode] = __Termcode && [PersonID] = __PersonID),"ContractType",[ContractType])))