Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

DAX - Calculate Column By Distinct Counts

Using DAX, how can I add an additional calculated column field that will return the distinct counts of deviceTxnId's for each deviceID?  
  • Yggdrasill's avatar
    Yggdrasill
    8 years ago
    count =
    CALCULATE (
        DISTINCTCOUNT ( 'table'[deviceTxnID] );
        ALLEXCEPT ( 'table'; 'table'[deviceID] )
    )

    Create a measure...