Forum Discussion

Sammy22's avatar
Sammy22
Helper I
2 years ago
Solved

Countifs function with unique element

Hello,   I am trying to calculate the 'count' column in pBI but am struggling. I need to count the unique number of countries each customer is assigned to, for example John has 4, peter has 1 (Ital...
  • bhanu_gautam's avatar
    2 years ago

    Sammy22 , Try using below mentioned DAX measure

     

    Count = CALCULATE(DISTINCTCOUNT('Table'[Country]), ALLEXCEPT('Table', 'Table'[Customer]))