Forum Discussion

VeljkoP98's avatar
VeljkoP98
Frequent Visitor
3 years ago
Solved

Distinct count by Group

Book Story Genre Count Historical Book 1 Story1 Horror 0 Book 1 Story2 Romance 0 Book 1 Story3 Romance 0 Book 2 Story4 Historical 3 Book 2 Story5 Historical 3 B...
  • johnt75's avatar
    3 years ago

    Try

    Count historical =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        ALLEXCEPT ( 'Table', 'Table'[Book] ),
        'Table'[Genre] = "Historical"
    )